Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
listen_for_commands: stop leaking the control socket to forked procs
All the "exec"d processes would get a copy of the control socket descriptor, because of the default UNIX semantics of fd inherit across execv(). This was easily seen on my system where an 'lsof' revealed that all my terminals and shells had a copy. To fix this we add the SOCK_CLOEXEC flag whilst opening the listener socket(), avoiding this problem. The "bar" descriptor already handles this by setting O_CLOEXEC in its FIFO open() call.
- Loading branch information