>If the return code is not -1 then the errno is not reliable. > >Look in /usr/include/sys/wait.h, specifically at the WEXITSTATUS() and >friends macros. The return code is in the format of a stat returned from > a call to wait functions. > >return value of 1, when put through the WEXITSTATUS macro gives a return >code of 0 from the command run by the call to system() ie the cp or rm
WEXITSTATUS() is only valid if WIFEXITED() is true, i.e., the low 8 bits of the exit code are 0. A status of 1 indicates that the process died with a SIGHUP which is rather strange. Casper _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code