From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,afc5a3ed94577019,start X-Google-Attributes: gidfee84,public From: James Bond Subject: Return Status Codes for system() Function??? Date: 1997/05/23 Message-ID: <3385E815.41C6@klab.caltech.edu>#1/1 X-Deja-AN: 243431994 Organization: abc Newsgroups: comp.unix.osf.osf1 Hello, I'm stumped and hope this newsgroup can help me. I'm getting an error code from the system() function (C language) which doesn't appear to be documented anywhere. I am invoking system() which runs a shell script which in turn runs FTP. However the FTP invocation is failing although system() exits normally. The return status from system() is 256!? What does this code mean? Note errno is NOT set. errno is still zero. 256 is the int value that is returned by system(). According to the man page, system() will return 0 if successful. On error system() will return -1 and errno is set. Any other value (such as 256!) is the same as wait(). Looking at the wait() man page, it tells you to see the wait.h file. Looking at the wait.h file, there is no mention of the 256 return status! What gives? Looking at the other header files, there is no clue about the return values of system(). Tried looking at the DEC website and could not find a list of values. Actually, a list of the possible values system() returns and their meanings would be very helpful. I'm working on a DEC Alpha with OSF/1 and the cc compiler that came with the machine. Please cc: your reply to my email address below as I don't read this newsgroup very often. Thank you. ----------------------------------------------------------- Al Wong, wong@southport.jpl.nasa.gov The Jet Propulsion Laboratory Pasadena, California (818) 795-4928, x234 -----------------------------------------------------------