1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-08 05:36:32 +00:00

Replaced SIGUSR1 with socketpair for synchronization between parent and child processes on RECVFROM type addresses

This commit is contained in:
Gerhard Rieger 2023-06-23 22:48:26 +02:00
parent a0e17a813a
commit 02483ff39e
12 changed files with 269 additions and 257 deletions

View file

@ -545,7 +545,7 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
applyopts(fdi, *copts, PH_LATE2);
}
if (withfork) {
Info("Signalling parent ready");
Info("notifying parent that child process is ready");
Close(trigger[1]); /* in child, notify parent that ready */
}
} /* withfork */
@ -603,7 +603,7 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
fds[0].fd = trigger[0];
fds[0].events = POLLIN|POLLHUP;
Poll(fds, 1, -1);
Info("Child process signalled ready");
Info("child process notified parent that it is ready");
}
return pid; /* indicate parent (main) process */