Fix a file descriptor leak in the daemonization

Especially when using the Python API, the child process inherits of
the file descriptiors of the script.

Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
Fix a file descriptor leak in the monitord spawn

Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>