X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/8d372122ebab7e141ec3dd357c7673f7413f19ea..d056fbdff1c5a26be055c38eee4c273ee6a0cba7:/sys/mdup.3 diff --git a/sys/mdup.3 b/sys/mdup.3 index f08c13e..567da6a 100644 --- a/sys/mdup.3 +++ b/sys/mdup.3 @@ -17,21 +17,31 @@ \h'-\w'\\$1\ 'u'\\$1\ \c .ft P .. -.ie t .ds o \(bu -.el .ds o o +.ie t \{\ +. ds o \(bu +. de VP +. sp .4v +.. +\} +.el \{\ +. ds o o +. de VP +. sp +.. +\} .TH mdup 3 "4 January" "Straylight/Edgeware" "mLib utilities library" .SH NAME mdup \- renumber file descriptors .SH SYNOPSIS .nf .B "#include " - +.PP .ta 2n .B "typedef struct {" .B " int cur;" .B " int want;" .B "} mdup_fd;" - +.PP .BI "int mdup(mdup_fd *" v ", size_t " n ");" .fi .SH DESCRIPTION @@ -113,7 +123,7 @@ this. int p_in[2] = P_INIT, p_out[2] = P_INIT, p_err[2] = P_INIT; pid_t kid = -1; int i; - +.VP if (pipe(p_in) || pipe(p_out) || pipe(p_err)) goto error; if ((kid = fork()) < 0) goto error; if (!kid) { @@ -153,7 +163,7 @@ int p_in[2] = P_INIT, p_out[2] = P_INIT, p_err[2] = P_INIT; pid_t kid = -1; mdup_fd md[3]; int i; - +.VP if (pipe(p_in) || pipe(p_out) || pipe(p_err)) goto error; if ((kid = fork()) < 0) goto error; if (!kid) { @@ -184,4 +194,3 @@ wanted ends of the pipes. .BR mLib (3). .SH AUTHOR Mark Wooding, -