mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
18 lines
296 B
V
18 lines
296 B
V
|
module main
|
||
|
|
||
|
import os
|
||
|
|
||
|
fn exec(args []string) {
|
||
|
os.execve('/bin/bash', args, []) or {
|
||
|
// eprintln(err)
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
// exec(["-c","find /"]) //works
|
||
|
exec(['-c', 'find /tmp/']) // here it works as well
|
||
|
|
||
|
// exec(["-c","find","/tmp/"]) // does not work I guess is normal
|
||
|
}
|