From 29a8f74fadcdfceeec25b399a23b567f81ca299c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 17 Aug 2007 12:44:01 -0400 Subject: Complete proper daemonization by closing std* descriptors. This fixes install as well as /sbin/services does not hang anymore --- ipa-server/ipa-kpasswd/ipa_kpasswd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipa-server/ipa-kpasswd/ipa_kpasswd.c b/ipa-server/ipa-kpasswd/ipa_kpasswd.c index 97d44870..c59db44b 100644 --- a/ipa-server/ipa-kpasswd/ipa_kpasswd.c +++ b/ipa-server/ipa-kpasswd/ipa_kpasswd.c @@ -891,6 +891,10 @@ int main(int argc, char *argv[]) /* new session */ setsid(); + /* close std* descriptors */ + close(0); + close(1); + close(2); /* fork again to make sure we completely detach from parent process */ pid = fork(); -- cgit