[Bug 102834] [patch] mail(1) hangs on the sigsuspend system call in popen.c

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 18 18:25:00 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=102834

--- Comment #14 from longwitz at incore.de ---
The problem in this PR is the fact that in the functions wait_child() and
free_child() of source popen.c the call of findchild() must be done after the
call of the sigfunctions. For wait_child() this was solved with commit 236286.
For free_child() this was solved together with some other changes in STABLE 10
and 11 but reverted because of another problem reported in PR 230196. 

For Stable 11 the following patch would be enough to close this PR:

--- popen.c.orig        2019-02-18 19:07:59.043267000 +0100
+++ popen.c     2019-02-18 19:09:25.226232000 +0100
@@ -359,12 +359,14 @@
 free_child(int pid)
 {
        sigset_t nset, oset;
-       struct child *cp = findchild(pid);
+       struct child *cp;

        (void)sigemptyset(&nset);
        (void)sigaddset(&nset, SIGCHLD);
        (void)sigprocmask(SIG_BLOCK, &nset, &oset);

+       cp = findchild(pid);
+
        if (cp->done)
                delchild(cp);
        else

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list