diff options
Diffstat (limited to 'lib/libc/gen/popen.3')
-rw-r--r-- | lib/libc/gen/popen.3 | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index 9ca1bb3..2d2856b 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 @@ -150,13 +149,12 @@ The function does not reliably set .Va errno . .Sh SEE ALSO -.Xr fork 2 , .Xr sh 1 , +.Xr fork 2 , .Xr pipe 2 , -.Xr socketpair 2 , .Xr wait4 2 , -.Xr fflush 3 , .Xr fclose 3 , +.Xr fflush 3 , .Xr fopen 3 , .Xr stdio 3 , .Xr system 3 @@ -182,9 +180,9 @@ The .Fn popen argument always calls -.Xr sh , +.Xr sh 1 , never calls -.Xr csh . +.Xr csh 1 . .Sh HISTORY A .Fn popen |