diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-23 09:33:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-23 09:33:44 +0000 |
commit | 424bdbe51a67b42e902da8f18c0bdc83190d552e (patch) | |
tree | 75aab53db451c475ad3eb3f6c6705fa499432f43 | |
parent | d24065011612aa7911b13b65f24351a3adcd7dc6 (diff) |
use daemon()
-rw-r--r-- | libexec/rpc.yppasswdd/rpc.yppasswdd.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libexec/rpc.yppasswdd/rpc.yppasswdd.c b/libexec/rpc.yppasswdd/rpc.yppasswdd.c index 35c1114518d..9ff4879d59a 100644 --- a/libexec/rpc.yppasswdd/rpc.yppasswdd.c +++ b/libexec/rpc.yppasswdd/rpc.yppasswdd.c @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: rpc.yppasswdd.c,v 1.3 1996/06/26 22:11:26 maja Exp $"; +static char rcsid[] = "$Id: rpc.yppasswdd.c,v 1.4 1997/04/23 09:33:43 deraadt Exp $"; #endif #include <stdio.h> @@ -91,17 +91,7 @@ main(argc, argv) usage(); } - switch (fork()) { - case 0: - break; - case -1: - perror("fork"); - exit(1); - default: - exit(0); - } - - setsid(); + (void) daemon(0, 0); chdir("/etc"); /* |