[Sheepdog] [PATCH 3/6] collie: detach after collie initialization
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Tue May 4 21:20:07 CEST 2010
Collie should become a daemon after sheepdog finishes initialization
processes.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
collie/collie.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/collie/collie.c b/collie/collie.c
index 81dfb05..453c1b5 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -106,9 +106,6 @@ int main(int argc, char **argv)
if (ret)
exit(1);
- if (is_daemon && daemon(0, 0))
- exit(1);
-
ret = init_event(EPOLL_SIZE);
if (ret)
exit(1);
@@ -127,6 +124,9 @@ int main(int argc, char **argv)
exit(1);
}
+ if (is_daemon && daemon(0, 0))
+ exit(1);
+
vprintf(SDOG_NOTICE "Sheepdog daemon (version %s) started\n", SD_VERSION);
while (sys->status != SD_STATUS_SHUTDOWN)
--
1.5.6.5
More information about the sheepdog
mailing list