aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/popen.39
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3
index c4278e5f3e38..b22a57ef132d 100644
--- a/lib/libc/gen/popen.3
+++ b/lib/libc/gen/popen.3
@@ -53,16 +53,19 @@ function
a process by creating a bidirectional pipe
forking,
and invoking the shell.
+Any streams opened by previous
+.Fn popen
+calls in the parent process are closed in the new child process.
Historically,
-.Nm popen
+.Fn popen
was implemented with a unidirectional pipe;
hence many implementations of
-.Nm popen
+.Fn popen
only allow the
.Fa type
argument to specify reading or writing, not both.
Since
-.Nm popen
+.Nm
is now implemented using a bidirectional pipe, the
.Fa type
argument may request a bidirectional data flow.