Subject: pkg/7127: Fix for psmisc package
To: None <gnats-bugs@gnats.netbsd.org>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-bugs
Date: 03/11/1999 02:01:44
>Number: 7127
>Category: pkg
>Synopsis: `killall' and `pidof' fail to grok /proc filesystem
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 11 00:35:00 1999
>Last-Modified:
>Originator: Frederick Bruckman
>Organization:
>Release: Mar 9 ,1999
>Environment:
System: NetBSD handy.localnet 1.3K NetBSD 1.3K (HANDY) #24: Wed Mar 10 02:38:30 CST 1999
fredb@handy.localnet:/usr/src/sys/arch/i386/compile/HANDY i386
>Description:
The NetBSD patch for `killall' depends on the symbol "unix", which, egcs warns,
"is no longer defined." The upshot is that `killall' and `pidof' return
"/proc is empty. Not mounted?" even though /proc _is_ mounted.
>How-To-Repeat:
Build psmisc pkg, and install it. Try to kill a process with `killall', or to
identify one with `pidof' (which is aliased to `killall'), e.g. `pidof init'.
>Fix:
The following patch to a patch corrects the problem for egcs, without disturbing
the conditionals already set in place for the benefit of other compilers.
To test this, it may be necessary to move patch-ac.orig out of the way,
else the package system will try to apply it, too.
--- /usr/pkgsrc/sysutils/psmisc/patches/patch-ac.orig Fri Aug 7 06:26:03 1998
+++ /usr/pkgsrc/sysutils/psmisc/patches/patch-ac Thu Mar 11 01:16:10 1999
@@ -6,7 +6,7 @@
/* Copyright 1993-1998 Werner Almesberger. See file COPYING for details. */
-+#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#if (defined(__unix__) || defined(unix) || defined(__NetBSD__)) && !defined(USG)
+#include <sys/param.h>
+#endif
+
>Audit-Trail:
>Unformatted: