|
2006 07 24
|
SystemCall
A binding has been added for Christian Thaters callsystem code. This is like an asynchronous version of System system() that provides access to the standard input, output and error streams associated with the system call. A simple example:
SystemCall clone setCommand("ls") run stdout readLines foreach(println)
In this example, the calling coroutine is suspended until the call completes, but other coroutines run in the meantime. There is also an asyncRun() method if you want to interact with the streams while the command is running.
|