Why isn't argv[argc]==(char *)0 ?

Guy Harris guy at auspex.auspex.com
Sat Nov 25 09:09:23 AEST 1989


>well, main() and execv() originate in the first versions of UNIX and
>at least in Version 6, argv[argc] was (char *) -1.  The manual page stated
>that argv could not be used directly in a call to execv().  in version 7,
>they purged the ``not'' from the manual page....

...because they purged that "terminate it with -1" behavior from the
system.

>i'm not sure but maybe the v6 style behaviour survived in some unix derivates?

Not in V7, and not in its derivatives BSD and System {III,V}.  If you
know of any derivatives in which it still survives, let us know so we
can avoid those Mutant UNIXes From Hell....



More information about the Comp.unix.wizards mailing list