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/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D102834

--- 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 t=
he
call of the sigfunctions. For wait_child() this was solved with commit 2362=
86.
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.=20

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 =3D findchild(pid);
+       struct child *cp;

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

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

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



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