UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2007-08-23 05:53 PM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: system function

whether the process termination status when we call system() function is the same as the termination status when we call fork(),exec(),wait().
  which termination status is the real process termination status?how we decide it?
   thanks

Offline

#2 2007-08-23 10:06 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: system function

Yes, the return value from system() will be the same as the exit status code from
wait*()...  Exacatly as your local man page should explain to you...  To get the "real"
exit value of the app (or determine if it actually exited, or was killed by a signal), you
use the same W*() macros, which should be described in your local "man 2 wait" page...

Offline

Board footer

Powered by FluxBB