Ink can spawn child processes. The stdout data is passed to a callback when the process ends. |
|
std := load('../vendor/std') each := std.each log := std.log |
|
Let's take a look at the files in the directory relative to the executing file (in this instance, this website's build script). |
path := 'ls' `` path to executable arguments := [] stdin := '' stdoutFn := out => log(out) exec(path, arguments, stdin, stdoutFn) |
|
log('Arguments:') each(args(), arg => log(' ' + arg)) |
$ ink execing-processes.ink Arguments: ./ink-linux-1.9 ../tmp/execing-processes.ink {type: 'data', data: 'build.ink highlight.ink ink-darwin-1.9 ink-linux-1.9 test.ink '} |