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

Conor P. Cahill cpcahil at virtech.uucp
Thu Nov 16 12:24:39 AEST 1989


In article <547.nlhp3 at oracle.nl>, bengsig at oracle.nl (Bjorn Engsig) writes:
> The execv family of system calls all have  char *argv[]  as their second
> parameter, and you are required to put an endmarker as  (char *)0  in it.
> On the other hand, main has  int argc  and  char *argv[]  but here, the
> endmarker has disappeared.  Has it ever been considered to change the defi-

argv has always had an endmarker.  Older versions had the convention 
that argv[argc] == -1.  Currently under System V argv[argc] = (char *) 0.



-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.wizards mailing list