Anything invoking this copy of pinentry (haven't verified the other
pinentry packages), if closed prematurely before a password is
accepted or rejected from the terminal, results in further invocations
being blocked for a long time (I've seen indefinitely).
For example:
This invokes the following process tree:
: 55783,20; ps axuf | grep -A2 -B2 -e [p]inentry -e [g]pg
...
tconnors 51704 0.0 0.0 499120 3224 ? SLsl 2024 0:46 \_ /usr/bin/gpg-agent --supervised
tconnors 786820 0.8 0.0 251912 11564 ? SLl 17:04 0:00 | \_ pinentry
...
tconnors 786818 0.0 0.0 11288 4924 pts/337 SL+ 17:04 0:00 | | \_ gpg --batch --decrypt --quiet /home/tconnors/ntt/master.gpg
...
Now if I kill `gpg --batch ...`, then pinentry just spins:
tconnors 51704 0.0 0.0 499120 3224 ? SLsl 2024 0:46 \_ /usr/bin/gpg-agent --supervised
tconnors 786820 63.2 0.0 251912 11564 ? RLl 17:04 0:03 | \_ pinentry
[pid 786820] gettimeofday({tv_sec=1736489157, tv_usec=122208}, NULL) = 0
[pid 786820] poll([{fd=10, events=POLLIN}], 1, 70) = 1 ([{fd=10, revents=POLLIN|POLLERR|POLLHUP}])
[pid 786820] gettimeofday({tv_sec=1736489157, tv_usec=122614}, NULL) = 0
[pid 786820] read(10, "", 1) = 0
[pid 786820] gettimeofday({tv_sec=1736489157, tv_usec=123033}, NULL) = 0
[pid 786820] poll([{fd=10, events=POLLIN}], 1, 70) = 1 ([{fd=10, revents=POLLIN|POLLERR|POLLHUP}])
[pid 786820] gettimeofday({tv_sec=1736489157, tv_usec=123542}, NULL) = 0
One guesses that pinentry ignores SIGPIPE and/or errors and/or EOF
from the read system call. Even though it's primarily trying to be an
X11 display, it still allows fallback to terminal, so it should cope
correctly when the terminal does terminal things.