Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!bionet!agate!pasteur!ames!oliveb!intelca!mipos3!merlyn From: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Newsgroups: comp.lang.c Subject: Re: How big is the argv[] array? Summary: V6, guys! Message-ID: <2989@mipos3.intel.com> Date: 6 Oct 88 22:35:59 GMT References: <1239500004@osiris.cso.uiuc.edu> <8631@smoke.ARPA> <4206@bsu-cs.UUCP> <507@quintus.UUCP> Sender: news@mipos3.intel.com Reply-To: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA Lines: 26 In-reply-to: ok@quintus.UUCP (Richard A. O'Keefe) In article <507@quintus.UUCP>, ok@quintus (Richard A. O'Keefe) writes: | Which are the implementations of C where argv[] is present but argv[argc] | is not defined? Not so much undefined, as is different. Dig out an old V6 or PWB UNIX manual, if you got'em. In those beasties (back in the old days), argv[argc] == -1 In fact, the sentence in the V7 execve(2) manpage that reads something like "the array passed as argv can be used directly in another execve call because argv[argc] is 0" was changed only slightly from the same page in V6 which read "the array... *cannot* be used... argv[argc] is -1". It never made a lot of grammatical sense after the change. BSD (or is it Ultrix? Don't have access to a BSD manpage anymore) got rid of that sentence. Just a bit of history. If you are writing a program to port between 4.3-tahoe and a V6 system, beware! :-) -- Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 on contract to BiiN Technical Information Services (for now :-), in a former Intel building in Hillsboro, Oregon, USA or ...!tektronix!inteloa[!intelob]!merlyn Standard disclaimer: I *am* my employer!