From e1dfe717ec73a4e1b89b0c43b2104e638902739c Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 11 Mar 1997 19:28:24 +0000 Subject: [PATCH] Document that popen() uses a bidirectional pipe (in FreeBSD) and not a socket pair (as in Lite2). --- lib/libc/gen/popen.3 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index 545f061792c..2d2856b7ee5 100644 --- a/lib/libc/gen/popen.3 +++ b/lib/libc/gen/popen.3 @@ -50,7 +50,7 @@ The .Fn popen function .Dq opens -a process by creating an IPC connection, +a process by creating a bidirectional pipe forking, and invoking the shell. Historically, @@ -63,9 +63,9 @@ only allow the argument to specify reading or writing, not both. Since .Nm popen -is now implemented using sockets, the +is now implemented using a bidirectional pipe, the .Fa type -may request a bidirectional data flow. +argument may request a bidirectional data flow. The .Fa type argument is a pointer to a null-terminated string @@ -123,10 +123,9 @@ The function returns .Dv NULL if the -.Xr fork 2 , -.Xr pipe 2 , +.Xr fork 2 or -.Xr socketpair 2 +.Xr pipe 2 calls fail, or if it cannot allocate memory. .Pp @@ -153,7 +152,6 @@ function does not reliably set .Xr sh 1 , .Xr fork 2 , .Xr pipe 2 , -.Xr socketpair 2 , .Xr wait4 2 , .Xr fclose 3 , .Xr fflush 3 , -- 2.45.2