Author: ngie
Date: Fri Jan 13 08:48:20 2017
New Revision: 312040
URL: https://svnweb.freebsd.org/changeset/base/312040

Log:
  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

Modified:
  stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c      Fri Jan 13 
08:48:17 2017        (r312039)
+++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c      Fri Jan 13 
08:48:20 2017        (r312040)
@@ -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:
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to