home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / hp / 8737 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.1 KB

  1. Path: sparky!uunet!usc!cs.utexas.edu!swrinde!sdd.hp.com!hpscdc!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!mjs
  2. From: mjs@hpfcso.FC.HP.COM (Marc Sabatella)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Mkdir in fork
  5. Message-ID: <7371192@hpfcso.FC.HP.COM>
  6. Date: 30 Jul 92 16:43:33 GMT
  7. References: <1992Jul30.105754.7370@hp9000.csc.cuhk.hk>
  8. Organization: Hewlett-Packard, Fort Collins, CO, USA
  9. Lines: 20
  10.  
  11. In comp.sys.hp, a866700@hp9000.csc.cuhk.hk (Wong Siu To) writes:
  12.  
  13. >             execve ("/bin/mkdir", argv, envp);
  14. >             /*
  15. >              *  The execve() failed!
  16. >              */
  17. >             printf ("Utility [nqsmkdirs]:  Unable to execve() ");
  18. >             printf ("mkdir program.\n");
  19. >             printf ("Utility [nqsmkdirs]:  Reason: %s.\n",
  20. >                 sys_errlist [errno]);
  21.  
  22. A guess - the intervening printf's may be resetting "errno" to 0 after the
  23. failed execve.  Try saving the value of errno before printing your messages,
  24. or print errno in the first printf call after the failed execve.
  25.  
  26. --------------
  27. Marc Sabatella (marc@hpmonk.fc.hp.com)
  28. Disclaimers:
  29.     2 + 2 = 3, for suitably small values of 2
  30.     Bill (H.) and Dave (P.) may not always agree with me
  31.