Patch for socketfd == 0 in daemon mode