Quote:
Originally Posted by DEF.
A college is calling an application from system() and wants to inspect the applications return code.
I don't beleive system() return is useful here so any ideas?
|
Yes. To find out what the
system() return is, look at the, um,
RETURN VALUE section of
man system:
Code:
RETURN VALUE
The value returned is -1 on error (e.g. fork(2) failed), and the
return status of the command otherwise. This latter return status is
in the format specified in wait(2). Thus, the exit code of the command
will be WEXITSTATUS(status). In case /bin/sh could not be executed,
the exit status will be that of a command that does exit(127).
What part of this excerpt of the man page puzzles you?