Don't know if this should be considered a bug after all, but adding --batch does the trick:
gpg --quiet --no-use-agent --batch --sign --passphrase XXX -u "YYY" --output SIG FILE &> /dev/null
Don't know if this should be considered a bug after all, but adding --batch does the trick:
gpg --quiet --no-use-agent --batch --sign --passphrase XXX -u "YYY" --output SIG FILE &> /dev/null