From 09802b4a8948d097c3f871c831db926929c09839 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 15 Dec 1995 13:13:32 +0000 Subject: [PATCH] The version of setproctitle() inside nfsd was busted. It was not terminating the argv array, causing parts of the argv[0] to be picked up several times by libkvm, causing strange ps results for the nfs-server and nfs-master processes.. :-] (How many copies of setproctitle() do we need anyway? NetBSD has it in libc and BSDI have it in libutil.) --- sbin/nfsd/nfsd.c | 1 + usr.sbin/nfsd/nfsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c index 8c8731dab79..3de2251c6d4 100644 --- a/sbin/nfsd/nfsd.c +++ b/sbin/nfsd/nfsd.c @@ -657,5 +657,6 @@ setproctitle(a) cp += strlen(cp); while (cp < LastArg) *cp++ = '\0'; + Argv[1] = NULL; } #endif /* __FreeBSD__ */ diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index 8c8731dab79..3de2251c6d4 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -657,5 +657,6 @@ setproctitle(a) cp += strlen(cp); while (cp < LastArg) *cp++ = '\0'; + Argv[1] = NULL; } #endif /* __FreeBSD__ */