diff options
Diffstat (limited to 'bsd-daemon.c')
-rw-r--r-- | bsd-daemon.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bsd-daemon.c b/bsd-daemon.c index de829958c..f704a9048 100644 --- a/bsd-daemon.c +++ b/bsd-daemon.c | |||
@@ -51,6 +51,13 @@ daemon(nochdir, noclose) | |||
51 | case 0: | 51 | case 0: |
52 | break; | 52 | break; |
53 | default: | 53 | default: |
54 | #ifdef HAVE_CYGWIN | ||
55 | /* | ||
56 | * This sleep avoids a race condition which kills the | ||
57 | * child process if parent is started by a NT/W2K service. | ||
58 | */ | ||
59 | sleep(1); | ||
60 | #endif | ||
54 | _exit(0); | 61 | _exit(0); |
55 | } | 62 | } |
56 | 63 | ||