I'd rather made it more readable: daemonize() falied with error %s (errno %d) and also use strerror for actual error message, since errno is rarely very informative by itself.