diff options
author | Peter Wemm <peter@FreeBSD.org> | 1996-01-01 08:39:39 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1996-01-01 08:39:39 +0000 |
commit | c129841af740b522db756a7ba6958a4d98882b6d (patch) | |
tree | 131521a2fb4a060a82dc7f9a9033c7702fa10104 /sbin/nfsd/nfsd.c | |
parent | 10dcae580656b6c36d980a9d6ee2dd19a18ea5da (diff) | |
download | src-c129841af740b522db756a7ba6958a4d98882b6d.tar.gz src-c129841af740b522db756a7ba6958a4d98882b6d.zip |
Make nfsd use setproctitle from libutil...
Old code is still #ifdef OLD_SETPROCTITLE for comparison with the old
code.
Notes
Notes:
svn path=/head/; revision=13141
Diffstat (limited to 'sbin/nfsd/nfsd.c')
-rw-r--r-- | sbin/nfsd/nfsd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c index 3de2251c6d41..2fad7c258115 100644 --- a/sbin/nfsd/nfsd.c +++ b/sbin/nfsd/nfsd.c @@ -81,6 +81,7 @@ static char sccsid[] = "@(#)nfsd.c 8.7 (Berkeley) 2/22/94"; #include <stdlib.h> #include <strings.h> #include <unistd.h> +#include <libutil.h> /* Global defs */ #ifdef DEBUG @@ -91,8 +92,10 @@ int debug = 0; #endif struct nfsd_srvargs nsd; +#ifdef OLD_SETPROCTITLE char **Argv = NULL; /* pointer to argument vector */ char *LastArg = NULL; /* end of argv */ +#endif #ifdef NFSKERB char lnam[ANAME_SZ]; @@ -108,9 +111,11 @@ NFSKERBKEYSCHED_T kerb_keysched; void nonfs __P((int)); void reapchild __P((int)); +#ifdef OLD_SETPROCTITLE #ifdef __FreeBSD__ void setproctitle __P((char *)); #endif +#endif void usage __P((void)); /* @@ -167,6 +172,7 @@ main(argc, argv, envp) } #endif +#ifdef OLD_SETPROCTITLE /* Save start and extent of argv for setproctitle. */ Argv = argv; if (envp == 0 || *envp == 0) @@ -174,6 +180,7 @@ main(argc, argv, envp) while (*envp) envp++; LastArg = envp[-1] + strlen(envp[-1]); +#endif #define MAXNFSDCNT 20 #define DEFNFSDCNT 4 @@ -643,6 +650,7 @@ reapchild(signo) while (wait3(NULL, WNOHANG, NULL) > 0); } +#ifdef OLD_SETPROCTITLE #ifdef __FreeBSD__ void setproctitle(a) @@ -660,3 +668,4 @@ setproctitle(a) Argv[1] = NULL; } #endif /* __FreeBSD__ */ +#endif |