…mbols. Tweaks arya@b5858d0
… as a signal name, not a signal number.
This sets the FD_CLOEXEC file descriptor on each server connection. This causes the socket connection to be automatically closed if the server uses any of the exec functions. Normally when forking a process, the new process receives a copy of all open file descriptors. If a bluepill command (such as restart) executes a system call that forks and runs for a long time, the bluepill client connection remains open in the forked process even after the bluepill server closes the connection. This causes the bluepill client's socket.read call to block forever, eventually timing out and raising a "Socket Timeout: Server may not be responding" error. Setting close_on_exec causes new processes to automatically close the socket connection, thus preventing this error.
This fixes a conflicting gem issue when bluepill is run with "bundle exec". Hat tip to @pda.