Mono Class Library: Mono.Unix.Native.Stdlib Overview | Members

Mono.Unix.Native.Stdlib.system Method

Pass a command to the shell. [Edit]

[System.CLSCompliant(false)]
public static int system (string string)

Parameters

string
The command to execute. [Edit]

Returns

If string is null, system will return a non-zero value if the command interpreter sh(1) is available, and zero if it is not.

Otherwise, the system function returns the exit status of the shell as returned by Syscall.waitpid(2), or -1 if an error occurred when invoking Syscall.fork(2) or Syscall.waitpid(2). A return value of 127 means the execution of the shell failed.

[Edit]

Remarks

The system() function hands the argument string to the command interpreter sh(1). The calling process waits for the shell to finish executing the command, ignoring Signum.SIGINT and Signum.SIGQUIT, and blocking Signum.SIGCHLD. [Edit]

Requirements

Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0