Follow-up Comment #6, bug #54178 (project wget):

Hi David

Thank you for you message, I will use WEXITSTATUS(result) as you describe.

BTW, I noticed my Ubuntu LTS machine man page for system(3) looks quite
different from yours. I wonder if you are not running GNU/Linux?


RETURN VALUE
       The return value of system() is one of the following:

       *  If command is NULL, then a nonzero value if a shell is available,
or
          0 if no shell is available.

       *  If a child process could not be created, or its status could not 
be
          retrieved, the return value is -1.

       *  If  a  shell  could  not  be executed in the child process, then
the
          return value is as though the  child  shell  terminated  by 
calling
          _exit(2) with the status 127.

       *  If  all  system calls succeed, then the return value is the
termina‐
          tion status of the child shell used to execute command.  (The
termi‐
          nation  status of a shell is the termination status of the last
com‐
          mand it executes.)

       In the last two cases, the return value is a "wait status" that can 
be
       examined using the macros described in waitpid(2).  (i.e.,
WIFEXITED(),
       WEXITSTATUS(), and so on).

       system() does not affect the wait status of any other children.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54178>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to