This commit is contained in:
ge
2025-12-28 20:42:30 +03:00
commit 7a67749f1f
20 changed files with 1130 additions and 0 deletions

17
pipe.c.v Normal file
View File

@@ -0,0 +1,17 @@
module runcmd
import os
struct Pipe {
pub:
r int = -1
w int = -1
}
fn pipe() !Pipe {
mut fds := [2]int{}
if C.pipe(&fds[0]) == -1 {
return os.last_error()
}
return Pipe{fds[0], fds[1]}
}