On Wed, 17 Sep 2014 15:29:46 -0500, John McKown <[email protected]> wrote:
>OK, I've run across yet another thing to "whine" about. The IBM C >compiler, tested on z/OS 2.1, does not support a "three parameter" >main() function. What I mean is that > >int main(int argc, char *argv[]) works properly, but >int main(int argc, char *argv[], char *env[]) does not initialize the >env parameter properly. Oh, it has "something" in it. But not anything >useful. I checked the UNIX documentation on exec() and _it_ supports >sending the environment array pointer. Seems really weird to me. >Luckily, I can easily scan the environment via the extern char >**environ variable which is properly initialized. I am quite >disappointed with IBM. On the plus side, the generated code looks >pretty good. Just to clarify: did you try this with your own invocation of exec(), passing that 3rd parameter? Otherwise perhaps all you've found is that the method you used to invoke your program does not provide that parameter. -- Walt ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
