Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2006 19:14:44 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Michael Butler <imb@protected-networks.net>
Cc:        stable@freebsd.org, gad@freebsd.org
Subject:   Re: something changed with 'ps' ?
Message-ID:  <20060405161444.GJ1375@deviant.kiev.zoral.com.ua>
In-Reply-To: <4433E269.3030104@protected-networks.net>
References:  <4433E269.3030104@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Wed, Apr 05, 2006 at 11:29:45AM -0400, Michael Butler wrote:
> In particular, the command-line used by the nagios plug-in check_procs 
> produces:
> 
> imb@aaron:/home/imb> /bin/ps axwo 'state uid ppid vsz rss pcpu ucomm 
> command'
> Segmentation fault (core dumped)
> 
> Removing 'ppid' stops it from dumping core,
> 

This is result of MFC of rev. 1.73, 1.74 of bin/ps/keyword.c.
Try the following fix:

Index: bin/ps/keyword.c
===================================================================
RCS file: /usr/local/arch/ncvs/src/bin/ps/keyword.c,v
retrieving revision 1.74
diff -u -r1.74 keyword.c
--- bin/ps/keyword.c	8 Mar 2006 09:15:20 -0000	1.74
+++ bin/ps/keyword.c	5 Apr 2006 16:12:50 -0000
@@ -302,6 +302,8 @@
 	hp = strchr(p, '=');
 	if (hp)
 		*hp++ = '\0';
+	else
+		hp = p;
 
 	key.name = p;
 	v = bsearch(&key, var, sizeof(var)/sizeof(VAR) - 1, sizeof(VAR), vcmp);

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEM+zyC3+MBN1Mb4gRAlcpAKCD+Q547z+waUD1ZtJRjB6s+o2ZHgCeMbfx
G08eYECwxlfTSryYw/mQpSA=
=F2CQ
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060405161444.GJ1375>