pidref: Add pidref_wait_for_terminate_full()
We can use this to replace wait_for_terminate_with_timeout(). Because we poll a pidfd, we don't need to block SIGCHLD anymore in umount.c.
This commit is contained in:
+2
-2
@@ -1653,7 +1653,7 @@ static int socket_address_listen_in_cgroup(
|
||||
fd = receive_one_fd(pair[0], 0);
|
||||
|
||||
/* We synchronously wait for the helper, as it shouldn't be slow */
|
||||
r = wait_for_terminate_and_check("(sd-listen)", pid.pid, WAIT_LOG_ABNORMAL);
|
||||
r = pidref_wait_for_terminate_and_check("(sd-listen)", &pid, WAIT_LOG_ABNORMAL);
|
||||
if (r < 0) {
|
||||
safe_close(fd);
|
||||
return r;
|
||||
@@ -3181,7 +3181,7 @@ static int socket_accept_in_cgroup(Socket *s, SocketPort *p, int fd) {
|
||||
cfd = receive_one_fd(pair[0], 0);
|
||||
|
||||
/* We synchronously wait for the helper, as it shouldn't be slow */
|
||||
r = wait_for_terminate_and_check("(sd-accept)", pid.pid, WAIT_LOG_ABNORMAL);
|
||||
r = pidref_wait_for_terminate_and_check("(sd-accept)", &pid, WAIT_LOG_ABNORMAL);
|
||||
if (r < 0) {
|
||||
safe_close(cfd);
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user