Subject: Re: sysv ps(1) implementation [was: ps(1) sysv silliness]
To: John Hawkinson <jhawk@MIT.EDU>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 06/08/2000 12:43:46
>| So, yes, a normal csh-type alias would work under some situations, but
>| not all...  OTOH, if I'm the only one that uses this sort of thing then
>| just groping __progname will be good enough.
>
>Checking __progname is extremely poor style.

huh?  loads of programs do it all the time...well...argv[0] at least,
but that's where __progname comes from anyway.  loads...perhaps
they're all just special cases?

sendmail/mailq/hoststat/...
chown/chgrp
ex/vi/view
cksum/md5/sum
hexdump/od
quotaon/quotaoff
chfn/chpass/chsh
passwd/yppasswd
less/more/page
...
ramdiskbin/cp/ln/mv/sh/init/...

i, for one, am extremely fond of having a copy of ramdiskbin in the
root of all my filesystems.  sure, it eats a more than a meg of disk
space, but the benefits are high higher than the losses.

>Users should be able to copy binaries around
>and rename them as they see fit without seeing
>strange lossage or behavior changes.

    % touch me
    % ls -l me
    -rw-r--r--  1 andrew  staff  0 Jun  8 12:36 me
    % cp /usr/sbin/chown ./foo
    % cp /usr/sbin/chown ./bar
    % ./foo 0 me
    foo: me: Operation not permitted
    % ./bar 0 me
    % ls -al me
    -rw-r--r--  1 andrew  wheel  0 Jun  8 12:36 me

???

>While it's acceptable to grandfather in this sort of thing
>because it has been there forever, adding new instances of it
>should be forbidden.

while it's acceptable to do cool things, you should cease from doing
new cool things.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."