Method Process.system()


Method system

__deprecated__ int system(string command, void|Stdio.Stream stdin, void|Stdio.Stream stdout, void|Stdio.Stream stderr)

Description

Executes command as a shell statement ("/bin/sh -c  command" for Unix, "cmd /c command" for Windows), waits until it has finished and returns its return value.

Parameter stdin
Parameter stdout
Parameter stderr

Stream objects to use as standard input, standard output and standard error, respectively, for the created process. The corresponding streams for this process are used for those that are left out.

Returns

Returns the exit code for the subprocess on normal completion. Returns the negation of the last signal code if it terminated due to a signal.

Note

In Pike 8.0 and earlier this function returned the result straight from Process.Process()->wait().

Deprecated

Replaced by Process.Process.

See also

spawn, popen