daemonize now returns the errno value if an error occures