* [9front] thread(2) procexec
@ 2019-12-18 20:34 Jacob Moody
2019-12-19 4:39 ` Alex Musolino
0 siblings, 1 reply; 4+ messages in thread
From: Jacob Moody @ 2019-12-18 20:34 UTC (permalink / raw)
To: 9front
Hello,
I noticed that thread(2) claims that procexec and procexecl return -1
on error, but have a return type of void. This patch removes the
mention of the -1 return from the man page.
diff -r bd352bcef025 sys/man/2/thread
--- a/sys/man/2/thread Wed Dec 18 09:01:38 2019 +1030
+++ b/sys/man/2/thread Wed Dec 18 14:27:39 2019 -0600
@@ -332,7 +332,6 @@
on success,
they replace the calling thread (which must be the only thread in its proc)
and invoke the external program, never returning.
-On error, they return \-1.
If
.I cpid
is not null, the pid of the invoked program
--
Jacob Moody
ISEAGE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] thread(2) procexec
2019-12-18 20:34 [9front] thread(2) procexec Jacob Moody
@ 2019-12-19 4:39 ` Alex Musolino
2019-12-19 6:32 ` Jacob Moody
0 siblings, 1 reply; 4+ messages in thread
From: Alex Musolino @ 2019-12-19 4:39 UTC (permalink / raw)
To: 9front
I think the following would be better, as it more closely resembles
the DIAGNOSTICS section from exec(2).
diff -r 3e677a96125d sys/man/2/thread
--- a/sys/man/2/thread Tue Dec 10 15:13:44 2019 +1030
+++ b/sys/man/2/thread Thu Dec 19 15:07:34 2019 +1030
@@ -332,7 +332,8 @@
on success,
they replace the calling thread (which must be the only thread in its proc)
and invoke the external program, never returning.
-On error, they return \-1.
+On error, they return and set
+.IR errstr .
If
.I cpid
is not null, the pid of the invoked program
--
Cheers,
Alex Musolino
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] thread(2) procexec
2019-12-19 4:39 ` Alex Musolino
@ 2019-12-19 6:32 ` Jacob Moody
2019-12-19 6:45 ` Alex Musolino
0 siblings, 1 reply; 4+ messages in thread
From: Jacob Moody @ 2019-12-19 6:32 UTC (permalink / raw)
To: 9front
That looks better, probably best to document that they do return on error.
On Wed, Dec 18, 2019 at 10:40 PM Alex Musolino <alex@musolino.id.au> wrote:
>
> I think the following would be better, as it more closely resembles
> the DIAGNOSTICS section from exec(2).
>
> diff -r 3e677a96125d sys/man/2/thread
> --- a/sys/man/2/thread Tue Dec 10 15:13:44 2019 +1030
> +++ b/sys/man/2/thread Thu Dec 19 15:07:34 2019 +1030
> @@ -332,7 +332,8 @@
> on success,
> they replace the calling thread (which must be the only thread in its proc)
> and invoke the external program, never returning.
> -On error, they return \-1.
> +On error, they return and set
> +.IR errstr .
> If
> .I cpid
> is not null, the pid of the invoked program
>
> --
> Cheers,
> Alex Musolino
--
Jacob Moody
ISEAGE
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-19 6:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 20:34 [9front] thread(2) procexec Jacob Moody
2019-12-19 4:39 ` Alex Musolino
2019-12-19 6:32 ` Jacob Moody
2019-12-19 6:45 ` Alex Musolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).