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/29/1996 14:51:09
>> Personally? I don't like things that mutate based on argv[0]. It
>> is rarely useful and even more rarely justifiable, in my opinion.
> Convenience is the standard argument in favor of this. In this case
> it seems useful.
Yeah. I haven't really thought about whether I'd rather have it in the
proposed form (getty-vs-uugetty is the only way of controlling whether
it does locking) or not have it at all.
>> (It's really obnoxious to have to write a wrapper that passes an
>> argv[0] string that doesn't point to the executable just to coax it
>> into behaving....)
> Could you elaborate a little on this? I don't follow you at all,
> here.
There are actually two points here, and I was confusing the two.
One is that if I want to run (say) uugetty under some other name, say
getty-dialup, then it isn't enough to rename it or make a link; I have
to make getty-dialup a program (perhaps sh, perhaps C) that execs
uugetty.
The other is that if I want uugetty functionality without having
anything named "uugetty" in the filesystem, the only way to get it is
to write a wrapper that does something like
execl("/usr/libexec/getty","uugetty",...,(char *)0);
ie, passing an argv[0] that does not name the executable file.
der Mouse
mouse@rodents.montreal.qc.ca
01 EE 31 F6 BB 0C 34 36 00 F3 7C 5A C1 A0 67 1D