home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!rutgers!concert!samba!usenet
- From: Eli.Mantel@launchpad.unc.edu (Eli Mantel)
- Newsgroups: comp.unix.aix
- Subject: return code 9 from system()
- Message-ID: <1992Nov24.040413.27813@samba.oit.unc.edu>
- Date: 24 Nov 92 04:04:13 GMT
- Sender: usenet@samba.oit.unc.edu
- Distribution: na
- Organization: University of North Carolina Extended Bulletin Board Service
- Lines: 25
- Nntp-Posting-Host: lambada.oit.unc.edu
-
- I have been encountering a problem using the system() library routine
- (i.e. the routine that invokes another program or command).
-
- I am working on a program that is spawned from another program and thus
- runs "in the background". That program then will invoke certain
- commands via system(). It doesn't matter what the command is, but,
- sometimes it works just fine, and other times we get a return code of 9.
- (But once we get the return code of 9, all subsequent invocations also
- return a 9).
-
- According to the man page, this return code could only be coming from
- the program executed. Since the command executed doesn't matter, it
- seems like it must be coming from the shell, which I believe system()
- invokes to actually execute the command line specified.
-
- I realize that 9 is the "errno" value for "not a valid file descriptor",
- but there's no real reason to believe that the shell returns the errno
- value. I am interested in any suggestions about what might be causing
- this problem.
- Eli Mantel (eli.mantel@launchpad.unc.edu)
- --
- The opinions expressed are not necessarily those of the University of
- North Carolina at Chapel Hill, the Campus Office for Information
- Technology, or the Experimental Bulletin Board Service.
- internet: laUNChpad.unc.edu or 152.2.22.80
-