On Thu, Mar 27, 2008 at 09:16:31AM +0100, Frans Pop wrote:
> On Thursday 27 March 2008, Frans Pop wrote:
> > So I guess this should be turned into an upstream wishlist bug to
> > implement support for -x as a substitute for the old behavior.
> 
> After thinking about this a bit, could it be that the old behavior was a 
> deliberate compromise between having a separate '-x' option or just doing 
> the expected thing in most cases without needing the option? That would 
> seem to be a "busybox kind of choice": keeping things small while 
> maximizing functionality.

The problem is, it did not the right, at least according to the
comments:
                /* we require comm to match and to not be truncated */
                /* in Linux, if comm is 15 chars, it may be a truncated
                 * name, so we don't allow that to match */

The old version checks only the comm value (part of /proc/$pid/stat) which is
restricted to 15 characters:
| $ ps x | grep debian-in
| 13080 pts/4    S+     0:00 /bin/sh ./debian-installer
| $ cat /proc/13080/stat
| 13080 (debian-installe) S 4332 13080 4332 34820 13080 4194304 495 0 0 0 0 0 0 
0 20 0 1 0 4583708 6205440 356 4294967295 134512640 135180576 3215559616 
3215558472 3086480420 0 65536 4 65538 3222431225 0 0 17 1 0 0 0 0 0

The current variant uses argv[0] as match.

> In general I'd think that users would be more interested in what's running 
> inside the shell than in the shell itself.

Looks like a feature request.

Bastian

-- 
The heart is not a logical organ.
                -- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4

Attachment: signature.asc
Description: Digital signature

Reply via email to