mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +03:00
samba: Only use async signal-safe functions in signal handler
Otherwise shutdown can hang Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
e1fb902ca4
commit
361ea74357
@ -133,12 +133,10 @@ static void sig_term(int sig)
|
|||||||
* We're the process group leader, send
|
* We're the process group leader, send
|
||||||
* SIGTERM to our process group.
|
* SIGTERM to our process group.
|
||||||
*/
|
*/
|
||||||
DBG_ERR("SIGTERM: killing children\n");
|
|
||||||
kill(-getpgrp(), SIGTERM);
|
kill(-getpgrp(), SIGTERM);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
DBG_ERR("Exiting pid %d on SIGTERM\n", (int)getpid());
|
_exit(127);
|
||||||
exit(127);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sigterm_signal_handler(struct tevent_context *ev,
|
static void sigterm_signal_handler(struct tevent_context *ev,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user