What is the return value of "system()"? 
Author Message
 What is the return value of "system()"?

thx a lot...n_n


Sat, 26 Jun 2004 10:01:19 GMT  
 What is the return value of "system()"?

Quote:

> Subject: What is the return value of "system()"?

It is system-dependent.  BTW, in the future please don't ask your
question in the subject.


Sat, 26 Jun 2004 10:13:03 GMT  
 What is the return value of "system()"?


Quote:
> thx a lot...n_n

From
ISO/IEC 9899:1999 (E) :

<begin quote>
7.20.4.6 The system function

  Synopsis

1     #include <stdlib.h>
      int system(const char *string);

  Description

2 If 'string' is a null pointer, the system function determines
  whether the host environment has a command processor. If 'string'
  is not a null pointer, the 'system' function passes the string
  pointed to by 'string' to that command processor to be executed
  in a manner which the implementation shall document; this might
  then cause the program calling 'system' to behave in a non-conforming
  manner or to terminate.

  Returns

3 If the argument is a null pointer, the 'system' function returns
  nonzero only if a command processor is available. If the argument
  is not a null pointer, and the 'system' function does return, it
  returns an implementation-defined value.
<end quote>

IOW you'll need to consult the documentation for the
C implementation you're using.

-Mike



Sat, 26 Jun 2004 11:10:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Q: Return-values of system("...") calls

2. Comparisons with value returned from "signal".

3. Q : What is returned by "return;"

4. directing unix system call "system"s output

5. "system()" system call

6. I am going to study "C"

7. Raising "Invalid Property Values"

8. "Faking" null in value types

9. Send integer value by "send( )"

10. getting #define value from its "name"

11. "The value of ESP..." FAULT (newbie)

12. Get "iIndent" value from CComboBoxEX

 

 
Powered by phpBB® Forum Software