summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c/popen.3c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3c/popen.3c')
-rw-r--r--usr/src/man/man3c/popen.3c33
1 files changed, 13 insertions, 20 deletions
diff --git a/usr/src/man/man3c/popen.3c b/usr/src/man/man3c/popen.3c
index ebf8b88262..56f90269ae 100644
--- a/usr/src/man/man3c/popen.3c
+++ b/usr/src/man/man3c/popen.3c
@@ -2,14 +2,14 @@
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T.
.\" Portions Copyright (c) 1997, The Open Group. All Rights Reserved.
-.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
.\" This notice shall appear on any product containing this material.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH popen 3C "14 Dec 2006" "SunOS 5.11" "Standard C Library Functions"
+.TH POPEN 3C "Dec 14, 2006"
.SH NAME
popen, pclose \- initiate a pipe to or from a process
.SH SYNOPSIS
@@ -77,12 +77,10 @@ returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the error.
The \fBpclose()\fR function will fail if:
.sp
.ne 2
-.mk
.na
\fB\fBECHILD\fR\fR
.ad
.RS 10n
-.rt
The status of the child process could not be obtained, as described in the
DESCRIPTION.
.RE
@@ -92,24 +90,20 @@ DESCRIPTION.
The \fBpopen()\fR function may fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEMFILE\fR\fR
.ad
.RS 10n
-.rt
There are currently \fBFOPEN_MAX\fR or \fBSTREAM_MAX\fR streams open in the
calling process.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The \fImode\fR argument is invalid.
.RE
@@ -172,13 +166,13 @@ most common usage of the Unsafe \fBsystem\fR(3C) function:
.sp
.in +2
.nf
-int my_system(const char *cmd)
+int my_system(const char *cmd)
{
FILE *p;
-
- if ((p = popen(cmd, "w")) == NULL)
- return (-1);
- return (pclose(p));
+
+ if ((p = popen(cmd, "w")) == NULL)
+ return (-1);
+ return (pclose(p));
}
.fi
.in -2
@@ -191,15 +185,14 @@ See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.TS
-tab() box;
-cw(2.75i) |cw(2.75i)
-lw(2.75i) |lw(2.75i)
-.
-ATTRIBUTE TYPEATTRIBUTE VALUE
+box;
+c | c
+l | l .
+ATTRIBUTE TYPE ATTRIBUTE VALUE
_
-Interface StabilitySee below.
+Interface Stability See below.
_
-MT-LevelSafe
+MT-Level Safe
.TE
.sp