Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2019 18:24:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 102834] [patch] mail(1) hangs on the sigsuspend system call in popen.c
Message-ID:  <bug-102834-227-DjFy1kxM2R@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-102834-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-102834-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

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

--- Comment #14 from longwitz@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.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-102834-227-DjFy1kxM2R>