commit 0484baa3662f1ce1ebc7a1e8bb125d938cbc3d17 parent 2e8abcd0be93ab5448aad922108d0dba833f31b7 Author: Sebastian <sebastian@sebsite.pw> Date: Sat, 4 Feb 2023 00:52:19 -0500 os::exec+freebsd: update pipe docs to match +linux Signed-off-by: Sebastian <sebastian@sebsite.pw> Diffstat:
M | os/exec/exec+freebsd.ha | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/os/exec/exec+freebsd.ha b/os/exec/exec+freebsd.ha @@ -43,6 +43,17 @@ export fn fork() (process | void | error) = { // let data = io::drain(pipe.0)!; // io::close(pipe.0)!; // exec::wait(&proc)!; +// +// To write to the standard input of a process: +// +// let pipe = exec::pipe(); +// exec::addfile(&cmd, os::stdin_file, pipe.0); +// let proc = exec::start(&cmd)!; +// +// io::writeall(data)!; +// io::close(pipe.1)!; +// io::close(pipe.0)!; +// exec::wait(&proc)!; export fn pipe() (io::file, io::file) = { return unix::pipe()!; };