v / examples / process
Raw file | 17 loc (13 sloc) | 296 bytes | Latest commit hash b712af56f
1module main
2
3import os
4
5fn exec(args []string) {
6 os.execve('/bin/bash', args, []) or {
7 // eprintln(err)
8 panic(err)
9 }
10}
11
12fn main() {
13 // exec(["-c","find /"]) //works
14 exec(['-c', 'find /tmp/']) // here it works as well
15
16 // exec(["-c","find","/tmp/"]) // does not work I guess is normal
17}