Page MenuHome GnuPG

gpg on Solaris does not print a signal description
Open, LowPublic

Description

On GNU/Linux running gpg and clicking C-c to send SIGINT:

$ gpg
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: Go ahead and type your message ...
^C
gpg: signal Interrupt caught ... exiting

The same thing on Solaris 11.4:

$ gpg
gpg: Warning: using insecure memory!
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: Go ahead and type your message ...
^C
gpg: signal 2 caught ... exiting

This can be fixed by using _sys_siglist in get_signal_name from common/signal.c

Event Timeline

werner added a subscriber: werner.

The main problem here was that this all is not async-safe and thus I once implemented only the standard cases I could test easily.

FWIW, if gpg-agent etc we use npth (i.e. a pthread wrapper) which make signal handling much easier because it is then just an event and can be handled in your main thread or a separate thread.