diff --git a/usr.sbin/rwalld/Makefile b/usr.sbin/rwalld/Makefile index 1c82f15fa71e..eba8e9a038f0 100644 --- a/usr.sbin/rwalld/Makefile +++ b/usr.sbin/rwalld/Makefile @@ -1,7 +1,7 @@ # # a makefile for /usr/sbin/rwalld # -# $Header: /cvsroot/src/usr.sbin/rwalld/Attic/Makefile,v 1.1 1993/04/04 19:01:05 cgd Exp $ +# $Header: /cvsroot/src/usr.sbin/rwalld/Attic/Makefile,v 1.2 1993/04/10 17:59:27 cgd Exp $ # PROG = rwalld @@ -13,8 +13,8 @@ RPCCOM = rpcgen RPCDLOC= /usr/include RPCDESC= rpcsvc/rwall.x -DPADD= ${LIBRPC} -LDADD= -lrpc +DPADD= ${LIBRPC} ${LIBUTIL} +LDADD= -lrpc -lutil rwall_svc.c: ${RPCDLOC}/${RPCDESC} @echo generating $@... diff --git a/usr.sbin/rwalld/rwalld.c b/usr.sbin/rwalld/rwalld.c index dbf561529b85..ec4462273ca8 100644 --- a/usr.sbin/rwalld/rwalld.c +++ b/usr.sbin/rwalld/rwalld.c @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$Header: /cvsroot/src/usr.sbin/rwalld/Attic/rwalld.c,v 1.1 1993/04/04 19:01:06 cgd Exp $"; +static char rcsid[] = "$Header: /cvsroot/src/usr.sbin/rwalld/Attic/rwalld.c,v 1.2 1993/04/10 17:59:30 cgd Exp $"; #endif #include @@ -108,18 +108,7 @@ main(argc, argv) void possess() { - int nfds = getdtablesize(); - int p = fork(); - - if (p < 0) { - perror("walld: couldn't fork"); - exit(1); - } else if (p > 0) { - exit(0); - } - - for (nfds--; nfds >= 0; nfds--) - close(nfds); + daemon(0, 0); } void killkids()