std.process
Authors:Walter Bright, Andrei Alexandrescu
- Execute command in a command shell.
Returns:
exit status of command
- Execute program specified by pathname, passing it the arguments (argv)
and the environment (envp), returning the exit status.
The 'p' versions of exec search the PATH environment variable
setting for the program.
- Runs cmd in a shell and returns its standard output. If
the process could not be started or exits with an error code,
throws an exception.
Example:
auto tempFilename = chomp(shell("mcookie")); auto f = enforce(fopen(tempFilename), "w"); scope(exit) { fclose(f) == 0 || assert(false); system("rm " ~ tempFilename); } ... use f ...