Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/session-child.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,14 @@ pam_conv_cb (int msg_length, const struct pam_message **msg, struct pam_response
static void
signal_cb (int signum)
{
/* Pass on signal to child, otherwise just quit */
/* Pass on signal to child, otherwise just quit.
* Use _exit: exit() is not async-signal-safe and can deadlock in malloc
* if SIGTERM arrives while the main thread holds the arena lock (#484).
*/
if (child_pid > 0)
kill (child_pid, signum);
else
exit (EXIT_SUCCESS);
_exit (EXIT_SUCCESS);
}

static XAuthority *
Expand Down