diff options
author | Simo Sorce <ssorce@redhat.com> | 2007-08-17 12:44:01 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2007-08-17 12:44:01 -0400 |
commit | 29a8f74fadcdfceeec25b399a23b567f81ca299c (patch) | |
tree | 2f32c464221499626efb83d79a33fa84166bbd4d | |
parent | 288128d560b2cda45dc69c83eff699469022df5a (diff) | |
download | freeipa-29a8f74fadcdfceeec25b399a23b567f81ca299c.tar.gz freeipa-29a8f74fadcdfceeec25b399a23b567f81ca299c.tar.xz freeipa-29a8f74fadcdfceeec25b399a23b567f81ca299c.zip |
Complete proper daemonization by closing std* descriptors.
This fixes install as well as /sbin/services does not hang anymore
-rw-r--r-- | ipa-server/ipa-kpasswd/ipa_kpasswd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ipa-server/ipa-kpasswd/ipa_kpasswd.c b/ipa-server/ipa-kpasswd/ipa_kpasswd.c index 97d448702..c59db44bc 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(); |