Close pipes created by follow after forking childs (#563)
In the follow process, we create two Unix pipes for bidirectional communication between child processes (prefetch, transform, apply) during replay mode. Each child process closes its unused pipe descriptors upon startup. For example, the prefetch process, which only writes to the transform process, closes the read end of its pipe descriptors immediately.
However, the follow process (parent) itself, which initializes these pipes, does not utilize them for communication. Leaving these pipe descriptors open in the follow process leads to an issue where EOF is not sent, even after the child processes close their ends upon completion. This situation can result in a deadlock, especially when an interruption occurs through Ctrl+C or a SIGTERM signal.
Signed-off-by:
Arunprasad Rajkumar <ar.arunprasad@gmail.com>
parent
e6d8628e
Please register or sign in to comment