Starting a command and waiting for it to finish:
"ls /etc" run-process wait-for-process
Starting a program in the background:
{ "emacs" "foo.txt" } run-detached
Running a command, throwing an exception if it exits unsuccessfully:
"make clean all" try-process
Running a command, throwing an exception if it exits unsuccessfully or if it takes too long to run:
<process>
"make test" >>command
5 minutes >>timeout
try-process
Running a command, throwing an exception if it exits unsuccessfully, and redirecting output and error messages to a log file:
<process>
"make clean all" >>command
"log.txt" >>stdout
+stdout+ >>stderr
try-process
Running a command, appending error messages to a log file, and reading the output for further processing:
"log.txt" ascii <file-appender> [
<process>
swap >>stderr
"report" >>command
ascii <process-reader> stream-lines sort reverse [ print ] each
] with-disposal