commit cfd89e87b72eb889a4e0f1d822cdf1073ff62a57
parent 30f2d9d88e860d721184c5b284dfab9a59661ff2
Author: Sebastian <sebastian@sebsite.pw>
Date: Mon, 8 May 2023 19:48:11 -0400
unix: fix pipe documentation
Diffstat:
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/unix/+freebsd/pipe.ha b/unix/+freebsd/pipe.ha
@@ -5,7 +5,7 @@ use errors;
use io;
use rt;
-// Flags to use for the [[io::file]]s returned by [[pipe]]
+// Flags to use for the [[io::file]]s returned by [[pipe]].
// Only NOCLOEXEC and NONBLOCK are guaranteed to be available.
export type pipe_flag = enum {
NOCLOEXEC = rt::O_CLOEXEC,
@@ -14,9 +14,7 @@ export type pipe_flag = enum {
};
// Create a pair of two linked [[io::file]]s, such that any data written to the
-// second [[io::file]] may be read from the first. If no [[pipe_flag]]s are
-// provided, [[pipe_flag::CLOEXEC]] is used. If you pass your own flags, it is
-// recommended that you add it unless you know that you don't want it.
+// second [[io::file]] may be read from the first.
export fn pipe(flags: pipe_flag...) ((io::file, io::file) | errors::error) = {
let fds: [2]int = [0...];
let flag: pipe_flag = 0;
diff --git a/unix/+linux/pipe.ha b/unix/+linux/pipe.ha
@@ -4,8 +4,8 @@ use errors;
use io;
use rt;
-// Flags to use for the [[io::file]]s returned by [[pipe]]. Only NOCLOEXEC and
-// NONBLOCK are guaranteed to be available.
+// Flags to use for the [[io::file]]s returned by [[pipe]].
+// Only NOCLOEXEC and NONBLOCK are guaranteed to be available.
export type pipe_flag = enum {
NOCLOEXEC = rt::O_CLOEXEC,
DIRECT = rt::O_DIRECT,
@@ -13,8 +13,7 @@ export type pipe_flag = enum {
};
// Create a pair of two linked [[io::file]]s, such that any data written to the
-// second [[io::file]] may be read from the first. If you pass your own flags,
-// it is recommended that you add it unless you know that you don't want it.
+// second [[io::file]] may be read from the first.
export fn pipe(flags: pipe_flag...) ((io::file, io::file) | errors::error) = {
let fds: [2]int = [0...];
let flag: pipe_flag = 0;