NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/53145: Improved POSIX and X/OPEN conformance (/etc/rc.subr)



P.S.  As far as I can tell, this is/was the only remaining use of non-POSIX
ps args in scripts in the distribution.

On Sun, Apr 1, 2018 at 7:35 AM, Bruce Lilly <bruce.lilly%gmail.com@localhost> wrote:
> The following reply was made to PR misc/53145; it has been noted by GNATS.
>
> From: Bruce Lilly <bruce.lilly%gmail.com@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: misc-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
> Subject: Re: misc/53145: Improved POSIX and X/OPEN conformance (/etc/rc.subr)
> Date: Sun, 1 Apr 2018 07:32:36 -0400
>
>  On Sun, Apr 1, 2018 at 3:20 AM, Robert Elz <kre%munnari.oz.au@localhost> wrote:
>  > The following reply was made to PR misc/53145; it has been noted by GNATS.
>  >
>  > From: Robert Elz <kre%munnari.OZ.AU@localhost>
>  > To: gnats-bugs%NetBSD.org@localhost
>  > Cc:
>  > Subject: Re: misc/53145: Improved POSIX and X/OPEN conformance (/etc/rc.subr)
>  > Date: Sun, 01 Apr 2018 14:16:43 +0700
>  >
>  >      Date:        Sun,  1 Apr 2018 04:40:01 +0000 (UTC)
>  >      From:        bruce.lilly%gmail.com@localhost
>  >      Message-ID:  <20180401044001.0628C7A212%mollari.NetBSD.org@localhost>
>  >
>  >    | Change of '-ax' to '-A' is reported on the NetBSD /bin/ps man page as equivalent
>  >
>  >  Yes, -ax and -A are the same and that can be changed.
>  >
>  >    | Change of '-o pid,command' to '-o pid,comm' is supported by NetBSD /bin/ps
>  >    | (although it is undocumented) and conforms to POSIX and X/OPEN standards.
>  >
>  >  It is documented (at least as far back as NetBSD 6) but does not mean the
>  >  same thing, NetBSD's "comm" is the same as the POSIX "comm", whereas
>  >  NetBSD's "command" is the same as POSIX "args" (which is also supported
>  >  on NetBSD as an alias for "command") so if  you can verify that changing it
>  >  from "pid,command" to "pid,args" works for you (with the heirloom version of
>  >  ps in use) I cannot see any reason we should not make that change.
>
>  It works for me (output same except for whitespace, which won't affect
>  operation):
>
>  root@e2500sa:/root# /bin/ps -p 1 -o pid,args
>  PID COMMAND
>    1 init
>  root@e2500sa:/root# /usr/pkg/heirloom/bin/ps -p 1 -o pid,args
>    PID COMMAND
>      1 init
>  root@e2500sa:/root# /usr/pkg/heirloom/bin/posix/ps -p 1 -o pid,args
>    PID COMMAND
>      1 init
>  root@e2500sa:/root# /usr/pkg/heirloom/bin/posix2001/ps -p 1 -o pid,args
>    PID COMMAND
>      1 init
>  root@e2500sa:/root# /usr/pkg/heirloom/bin/s42/ps -p 1 -o pid,args
>    PID COMMAND
>      1 init
>
>  >  I doubt that a pullup to -6 or -7 is warranted though (and perhaps not even -8)
>  >
>  >  kre
>
>  FYI, I looked briefly at the version (1.100) of rc.subr in -current
>  (a.k.a. -8), and
>  I believe the patch should work for that version also [ultimately, the
>  script calls
>  ps via _find_processes either with -p <pid> or -A (-ax) in addition to
>  the output
>  (-o ...) args].
>



Home | Main Index | Thread Index | Old Index