aboutsummaryrefslogtreecommitdiff
path: root/runcap.3
diff options
context:
space:
mode:
Diffstat (limited to 'runcap.3')
-rw-r--r--runcap.317
1 files changed, 11 insertions, 6 deletions
diff --git a/runcap.3 b/runcap.3
index 267a80c..61e7337 100644
--- a/runcap.3
+++ b/runcap.3
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with runcap. If not, see <http://www.gnu.org/licenses/>.
-.TH RUNCAP 2 "July 19, 2017" "RUNCAP" "User Commands"
+.TH RUNCAP 2 "July 24, 2017" "RUNCAP" "User Commands"
.SH NAME
runcap \- run external process and capture its stdout and stderr
.SH SYNOPSIS
@@ -28,7 +28,7 @@ runcap \- run external process and capture its stdout and stderr
.BI " char **" pstr ", size_t *" psize );
.sp
.BI "off_t runcap_tell(struct runcap *" rc ", int " stream );
-.BI "int runcap_seek(struct runcap *" rc ", int " stream ", off_t " off ", int " whence);
+.BI "off_t runcap_seek(struct runcap *" rc ", int " stream ", off_t " off ", int " whence);
.BI "int runcap_rewind(struct runcap *" rc ", int " stream );
.SH DESCRIPTION
The function
@@ -317,17 +317,22 @@ returns the number of retrieved characters (including the newline) on
success, 0 on end of stream, and -1 on error.
.PP
.B runcap_tell()
-returns the current offset (a non-negative value) on success, and -1
+and
+.B runcap_seek()
+return the current offset (a non-negative value) on success, and -1
on error.
.PP
-.B runcap_seek()
-and
.B runcap_rewind()
-return 0 on success and -1 on error.
+returns 0 on success and -1 on error.
.PP
When returning an error (-1), all functions set the global \fBerrno\fR
variable to the code describing the error.
.SH EXAMPLE
+The function below runs the
+.BR tar (1)
+command in verbose mode and returns its output as an array of
+strings.
+.PP
.in +4n
.nf
char **

Return to:

Send suggestions and report system problems to the System administrator.