[Swan] SIGINT and xauth.c
D. Hugh Redelmeier
hugh at mimosa.com
Mon Oct 7 17:57:26 EEST 2013
| From: D. Hugh Redelmeier <hugh at mimosa.com>
| If a SIGINT were delivered to another thread, but there was an xauth
| thread running, the xauth signal handler would catch the signal. As
| it is currently written, that signal handler calls lsw_abort if it
| doesn't find the thread in xauth.c's thread table.
I would bet that lsw_abort uses parts of the library that are not
re-entrant or perhaps even thread-safe. So the signal handler should
not call lsw_abort.
According to "Async-signal-safe functions" in signal(7), abort() itself is
safe to call in a signal handler. So too is write(2). This is a POSIX
feature.
More information about the Swan
mailing list