mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-24 09:00:12 +01:00
compositor: reset signal mask for children
The signal mask is inherited over fork() and exec(), we need to explicitly reset it. This allows the children to receive the signals the compositor itself has blocked, for example SIGINT and SIGTERM. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
409ef0a5c8
commit
c47ddfd852
1 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,11 @@ child_client_exec(int sockfd, const char *path)
|
|||
{
|
||||
int flags;
|
||||
char s[32];
|
||||
sigset_t allsigs;
|
||||
|
||||
/* do not give our signal mask to the new process */
|
||||
sigfillset(&allsigs);
|
||||
sigprocmask(SIG_UNBLOCK, &allsigs, NULL);
|
||||
|
||||
/* SOCK_CLOEXEC closes both ends, so we need to unset
|
||||
* the flag on the client fd. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue