1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-11 14:23:23 +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

@ -271,8 +271,10 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
#else
Shutdown(pipe->fd, SHUT_RD);
#endif
if (pipe->ppid > 0) {
Kill(pipe->ppid, SIGUSR1);
if (pipe->triggerfd >= 0) {
Info("notifying parent that socket is ready again");
Close(pipe->triggerfd);
pipe->triggerfd = -1;
}
}