Subject: Re: uugetty for NetBSD
To: Wolfgang Solfrank <ws@kurt.tools.de>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 10/29/1996 15:48:43
> > override it in either direction.  (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....)

> Huh?  Why would you want to write a wrapper?  Just rename/link the file
> to whatever name you want as argv[0]...

That can be somewhat difficult for an ordinary user.  (Well, I suppose a
symbolic link would work.)

An example of this kind of behavior is gzip;  it checks argv[0] for gzip,
gunzip, zcat, or gzcat.  You can force decompression with -d, but you can't
force "gunzip" to compress, and you can't force zcat to just compress a file
(and someone who can't write /usr/bin/ might want do do one of those things
if /usr/bin/gzip is deleted).

Gzip at least has reasonable default behavior, so you can rename it entirely
and still use its entire range of functionality (and with a .de suffix on
your domain, I'd have thought you might be sensitive to that desire); there
are some programs which absolutely require argv[0] to contain a recognized
keyword else they simply won't work.(*)  There are a few cases where that's
somewhat excusable (the all-in-one executable on installation roots, for
example), but I think it's used in a lot of cases because "it's a neat hack",
not because it is the most appropriate solution to a problem.


(*) Granted, that's not the only issue standing in the way of
internationalization by a LOOONG shot...