sd-event: do not update signal fd after PID is changed
Otherwise, child event source will not work after the process is forked and the event source is unref()ed on the child process.
This commit is contained in:
@@ -706,6 +706,9 @@ static void event_unmask_signal_data(sd_event *e, struct signal_data *d, int sig
|
||||
return;
|
||||
}
|
||||
|
||||
if (event_pid_changed(e))
|
||||
return;
|
||||
|
||||
assert(d->fd >= 0);
|
||||
|
||||
if (signalfd(d->fd, &d->sigset, SFD_NONBLOCK|SFD_CLOEXEC) < 0)
|
||||
|
||||
Reference in New Issue
Block a user