diff options
author | ngie <ngie@FreeBSD.org> | 2017-01-13 08:48:20 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-01-13 08:48:20 +0000 |
commit | fb7584b2e04bd790a7e41acf3dd2905f1ff98e23 (patch) | |
tree | e0f3b9efba4907e28964cfb38261cb1bbd452a89 /contrib/netbsd-tests/lib/libc | |
parent | 0121c546456826420083135a793921f0b10eb0fb (diff) | |
download | FreeBSD-src-fb7584b2e04bd790a7e41acf3dd2905f1ff98e23.zip FreeBSD-src-fb7584b2e04bd790a7e41acf3dd2905f1ff98e23.tar.gz |
MFC r311268:
Clarify lifetime of child(..) function
Ensure child exits when complete as it's always run in a forked
process.
Add a missing break statement in :pselect_sigmask when calling
child(..) for clarity and to avoid weird domino effects if the
child process somehow does something it's not supposed to do
with the logfiles, file descriptors, etc
CID: 1223369, 1223370, 1300301
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_select.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_select.c b/contrib/netbsd-tests/lib/libc/sys/t_select.c index 7af725a..437b67b 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_select.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_select.c @@ -135,6 +135,9 @@ child(const struct timespec *ts) "after timeout %s != %s", prmask(&nset, nbuf, sizeof(nbuf)), prmask(&oset, obuf, sizeof(obuf))); +#ifdef __FreeBSD__ + _exit(0); +#endif } ATF_TC(pselect_sigmask); @@ -154,6 +157,9 @@ ATF_TC_BODY(pselect_sigmask, tc) switch (pid = fork()) { case 0: child(NULL); +#ifdef __FreeBSD__ + break; +#endif case -1: err(1, "fork"); default: |