Subject: Re: uugetty for NetBSD
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
List: current-users
Date: 10/30/1996 06:05:51
>> Personally? I don't like things that mutate based on argv[0]. [...]
> So what you're saying is that given /usr/libexec/uugetty hard linked
> to /usr/libexec/getty, you want a way to run uugetty and have it not
> lock, and a way to run getty and have it lock.
Right. Or to run it under some name like "supplied-getty" and have it
do whichever I want, according to the command line.
> I'm not sure I see the difference between `getty' vs. `uugetty' and
> `getty -n' vs. `getty -l' (or whatever). After all, in the end
> they're both just arbitrary strings.
Welllll...kinda. The thing is, it's quite difficult to run an
executable with an argv[0] whose basename differs from the basename of
the path to the executable. Read that other note from someone about
gzip, and how it's not possible to make gunzip compress (short of
making a link to it or otherwise running it under another name).
> We have plenty of other programs under NetBSD that work this way,
> such as
As yet another someone else said, precedent is no excuse. I really
don't mind all that much if this is the default, as long as there are
command-line flags to override that default in every possible
direction.
> Mail/mailx,
I just skimmed /usr/src/usr.bin/mail/main.c, and I can't see that it
gives a damn what argv[0] is.
> at/atq/atrm/batch, chfn/chpass/chsh,
I already remarked on these.
> uptime/w,
I had no idea uptime and w were hardlinked. I see no particular reason
to do it that way, and certainly no reason there couldn't be flags to
control the behavior.
> zcmp/zdiff, passwd/yppasswd, reset/tset, compress/uncompress,
> gunzip/gzcat/gzip/zcat, hexdump/od, egrep/fgrep/grep, ex/vi/view,
> less/more/page, quotaoff/quotaon,
Sigh. I knew about the gzip family and the vi family, but not the
others. (Actually, {un,}compress sounds vaguely familiar; I may have
heard of it too.) I don't approve of any of them, absent flags I don't
know about to override the behavior implied by the name.
> sendmail/mailq/newaliases,
This one, at least, _does_ have options. -b allows you to override the
behavior implied by argv[0]. (Incidentally, there are _three_ magic
values: newaliases, mailq, and smtpd. smtpd implies -bd by default.)
der Mouse
mouse@rodents.montreal.qc.ca
01 EE 31 F6 BB 0C 34 36 00 F3 7C 5A C1 A0 67 1D