Why isn't argv[argc]==(char *)0 ?
Christoph Kuenkel
ckl at uwbln.UUCP
Sat Nov 18 06:01:54 AEST 1989
In article <11606 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> What makes you think that argv[argc]!=(char*)0 ?
> argv[argc]==(char*)0 is existing practice and is also required by
> [...]
> execv() definitely is UNIX- (or POSIX-) specific, but the main()
> and execv() interfaces are compatible in this regard since both
> originated within the same software development culture.
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....
i'm not sure but maybe the v6 style behaviour survived in some unix derivates?
christoph
--
# include <std/disclaimer.h>
Christoph Kuenkel/UniWare GmbH Kantstr. 152, 1000 Berlin 12, West Germany
ck at tub.BITNET ckl at uwbln {unido,tmpmbx,tub}!uwbln!ckl
More information about the Comp.unix.wizards
mailing list