Hi Štěpán,
On 12/11/22 18:30, Štěpán Němec wrote:
On Sun, 11 Dec 2022 17:05:48 +0100
Alejandro Colomar wrote:
On 12/8/22 16:34, Štěpán Němec wrote:
On Thu, 8 Dec 2022 04:14:42 -0500
Mike Frysinger wrote:
@@ -106,15 +107,15 @@ calls fail, or if the function cannot allocate memory,
NULL is returned.
.PP
.BR pclose ():
-on success, returns the exit status of the command; if
+on success, returns the exit status of the command; if one of the
.\" These conditions actually give undefined results, so I commented
.\" them out.
.\" .I stream
.\" is not associated with a "popen()ed" command, if
.\".I stream
.\" already "pclose()d", or if
-.BR wait4 (2)
-returns an error, or some other error is detected,
+.BR wait (2)
+family of calls returns an error, or some other error is detected,
\-1 is returned.
.PP
On failure, both functions set
I'll just point out that, if this goes in, putting "one of the" _after_
the comment would prevent rendering it incomprehensible.
Yes, thanks for pointing that out!
I'd move the entire "if one of the".
That would cause the same issue, though. AIUI, the "original" text read:
on success, returns the exit status of the command; if
.I stream
is not associated with a "popen()ed" command, if
.I stream
already "pclose()d", or if
.BR wait4 (2)
returns an error, or some other error is detected,
Then someone commented out lines 2-5 and added two lines of rationale:
on success, returns the exit status of the command; if
.\" These conditions actually give undefined results, so I commented
.\" them out.
.\" .I stream
.\" is not associated with a "popen()ed" command, if
.\".I stream
.\" already "pclose()d", or if
.BR wait4 (2)
returns an error, or some other error is detected,
Both Mike's change and your alternative proposal would make this quite
unobvious to future readers without resorting to VCS archaeology,
because the commented-out text would no longer make sense as a
continuation of the preceding text.
Ahhh, now I understand. So yes, you're right.
Cheers,
Alex