The listen socket should close on exec
Ignore SIGPIPE

When the daemon client disconnects we get a SIGPIPE and it kills the
daemon, prevent that by ignoring the signal. The write calls will get an
error instead.
Implement the docket client