X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/37259a8edba7fc842e1707f4187d5a7fcded6f5f..14a260e80d26f4ddd4ed6ba289183e95f5a16355:/openbsd-compat/daemon.c diff --git a/openbsd-compat/daemon.c b/openbsd-compat/daemon.c index f380139d..3efe14c6 100644 --- a/openbsd-compat/daemon.c +++ b/openbsd-compat/daemon.c @@ -44,6 +44,10 @@ # include #endif +#ifdef HAVE_UNISTD_H +# include +#endif + int daemon(int nochdir, int noclose) { @@ -53,18 +57,8 @@ daemon(int nochdir, int noclose) case -1: return (-1); case 0: -#ifdef HAVE_CYGWIN - register_9x_service(); -#endif break; default: -#ifdef HAVE_CYGWIN - /* - * This sleep avoids a race condition which kills the - * child process if parent is started by a NT/W2K service. - */ - sleep(1); -#endif _exit(0); }