Contents of argv[0]

Chris Torek chris at mimsy.UUCP
Wed Aug 16 23:38:19 AEST 1989


In article <10743 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>... If you're going to display argv[0] (which is about the only meaningful
>thing you can do with it), why not just print the whole thing.

I went around with this several times myself when installing a general
error-message facility in our local C library, and came up with the
same answer: print the whole thing.  The only bad effect is that
occasionally someone will see more detail than needed.  Eliding all
but the `program name' part (on Unix, all but the last path component)
has the bad effect that occasionally someone will miss detail that
was needed (e.g., whether the error came from the new experimental
version of a program or the old known-buggy version or. . .).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list