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 Paul mspaper wrote: > Please see my previous post, I have corrected a typo. > The return value is 1 (for rm and cp both) > For rm the errno = 0, > for cp the errno = 2 > (I am not completely sure if this errno is associated with this system call > as there are some other system calls called prior to this. Unable to capture > the errno appropriately as this issue occurrs intermittently. > A manual copy succeeds) > > The absolute path has been specified. > > > This message posted from opensolaris.org > _______________________________________________ > opensolaris-code mailing list > opensolaris-code@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/opensolaris-code _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code