Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore SIGPIPE in the Merlin server process (#49)
The merlin server writes to pipes received from the merlin client process. If the read end of those pipes is closed, e.g. because the merlin client process was killed, then when the server writes to the pipe it will generate a SIGPIPE. This kills the Merlin server. Ignore the SIGPIPE instead of unnecessarily dying. The fact that you get SIGPIPE when you write to a closed pipe is a classic Unix footgun, and this is the usual resolution. Another solution is to avoid pipes (in favor of e.g. socketpairs), but we can't do that because we write directly to the file descriptors received from the client.
- Loading branch information