mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: signal handling fix
* include/dotlock.h (dotlock_remove_lockfiles_reclaim): New. (dotlock_destroy, dotlock_remove_lockfiles): Add a flag to reclaim memory or not. * util/dotlock.c (dotlock_create): Use dotlock_remove_lockfiles_reclaim for atexit. (dotlock_destroy_unix, dotlock_destroy) (dotlock_remove_lockfiles): Add a reclaim flag. (dotlock_remove_lockfiles_reclaim): New. * g10/signal.c (got_fatal_signal): Disable flag of reclaim memory to avoid non-async-face call. * g10/keydb.c (maybe_create_keyring): Follow the API change. * g10/gpgv.c: Follow the API change. -- signal handler got_fatal_signal should not call non-async-signal-safe functions. When malloc is interrupted by a signal, it screws up. This issue is reported: https://bugs.g10code.com/gnupg/issue1515 http://bugs.debian.org/399904
This commit is contained in:
parent
6f0ec6ab48
commit
212a325d42
5 changed files with 32 additions and 17 deletions
|
@ -122,7 +122,7 @@ got_fatal_signal( int sig )
|
|||
|
||||
/* Reset action to default action and raise signal again. */
|
||||
init_one_signal (sig, SIG_DFL, 0);
|
||||
dotlock_remove_lockfiles ();
|
||||
dotlock_remove_lockfiles (0);
|
||||
#ifdef __riscos__
|
||||
riscos_close_fds ();
|
||||
#endif /* __riscos__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue