summaryrefslogtreecommitdiffstats
path: root/man3/popen.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/popen.3')
-rw-r--r--man3/popen.342
1 files changed, 21 insertions, 21 deletions
diff --git a/man3/popen.3 b/man3/popen.3
index c56d938e4..683f5649a 100644
--- a/man3/popen.3
+++ b/man3/popen.3
@@ -26,7 +26,7 @@ Standard C library
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR popen (),
@@ -67,7 +67,7 @@ to be set on the underlying file descriptor;
see the description of the
.B O_CLOEXEC
flag in
-.BR open (2)
+.MR open 2
for reasons why this may be useful.
.P
The return value from
@@ -76,7 +76,7 @@ is a normal standard I/O stream in all respects save that it must be closed
with
.BR pclose ()
rather than
-.BR fclose (3).
+.MR fclose 3 .
Writing to such a stream writes to the standard input of the command; the
command's standard output is the same as that of the process that called
.BR popen (),
@@ -94,15 +94,15 @@ The
.BR pclose ()
function waits for the associated process to terminate and returns the exit
status of the command as returned by
-.BR wait4 (2).
+.MR wait4 2 .
.SH RETURN VALUE
.BR popen ():
on success, returns a pointer to an open stream that
can be used to read or write to the pipe;
if the
-.BR fork (2)
+.MR fork 2
or
-.BR pipe (2)
+.MR pipe 2
calls fail, or if the function cannot allocate memory,
NULL is returned.
.P
@@ -114,7 +114,7 @@ on success, returns the exit status of the command; if
.\" is not associated with a "popen()ed" command, if
.\".I stream
.\" already "pclose()d", or if
-.BR wait4 (2)
+.MR wait4 2
returns an error, or some other error is detected,
\-1 is returned.
.P
@@ -128,9 +128,9 @@ function does not set
.I errno
if memory allocation fails.
If the underlying
-.BR fork (2)
+.MR fork 2
or
-.BR pipe (2)
+.MR pipe 2
fails,
.I errno
is set to indicate the error.
@@ -149,7 +149,7 @@ is set to
.BR ECHILD .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
-.BR attributes (7).
+.MR attributes 7 .
.TS
allbox;
lbx lb lb
@@ -172,7 +172,7 @@ POSIX.1-2008.
POSIX.1-2001.
.SH CAVEATS
Carefully read Caveats in
-.BR system (3).
+.MR system 3 .
.SH BUGS
Since the standard input of a command opened for reading shares its seek
offset with the process that called
@@ -183,7 +183,7 @@ Similarly, the output from a command
opened for writing may become intermingled with that of the original
process.
The latter can be avoided by calling
-.BR fflush (3)
+.MR fflush 3
before
.BR popen ().
.P
@@ -197,12 +197,12 @@ The only hint is an exit status of 127.
.\" .BR pclose ()
.\" function appeared in Version 7 AT&T UNIX.
.SH SEE ALSO
-.BR sh (1),
-.BR fork (2),
-.BR pipe (2),
-.BR wait4 (2),
-.BR fclose (3),
-.BR fflush (3),
-.BR fopen (3),
-.BR stdio (3),
-.BR system (3)
+.MR sh 1 ,
+.MR fork 2 ,
+.MR pipe 2 ,
+.MR wait4 2 ,
+.MR fclose 3 ,
+.MR fflush 3 ,
+.MR fopen 3 ,
+.MR stdio 3 ,
+.MR system 3