From: Konstantin Belousov <kostikbel@gmail.com>
To: Jilles Tjoelker <jilles@stack.nl>
Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>,
Jonathan de Boyne Pollard
<J.deBoynePollard-newsgroups@NTLWorld.com>,
supervision@list.skarnet.org
Subject: Re: NOTE_TRACK, EVFILT_PROC, kqueue, and subreapers
Date: Sun, 11 Dec 2016 19:54:51 +0200 [thread overview]
Message-ID: <20161211175451.GV54029@kib.kiev.ua> (raw)
In-Reply-To: <20161211124637.GA17315@stack.nl>
On Sun, Dec 11, 2016 at 01:46:38PM +0100, Jilles Tjoelker wrote:
> As reported in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213928
> reapers do not receive SIGCHLD when inheriting zombies, although they do
> receive SIGCHLD when an inherited descendant process later terminates
> and are awakened when in a wait call for a matching process. This should
> probably be fixed.
I agree, in principle. Could you update your tests/sys/kern/reaper.c to
include this scenario ?
Untested change to the kernel side is below.
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index f4f453c3556..92899740eef 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -455,6 +455,12 @@ exit1(struct thread *td, int rval, int signo)
if (!(q->p_flag & P_TRACED)) {
proc_reparent(q, q->p_reaper);
+ if (q->p_state == PRS_ZOMBIE) {
+ PROC_LOCK(q->p_reaper);
+ pksignal(q->p_reaper, SIGCHLD, q->p_ksi);
+ wakeup(q->p_reaper);
+ PROC_UNLOCK(q->p_reaper);
+ }
} else {
/*
* Traced processes are killed since their existence
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
next prev parent reply other threads:[~2016-12-11 17:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20161102185444.GA911@protected.rcdrun.com>
[not found] ` <20161201081829.GG1487@protected.rcdrun.com>
[not found] ` <20161201120531.374588b2@mydesk.domain.cxm>
[not found] ` <20161201172846.GP3428@protected.rcdrun.com>
[not found] ` <20161201124118.46778e2b@mydesk.domain.cxm>
[not found] ` <20161201174837.GR3428@protected.rcdrun.com>
[not found] ` <20161201125438.15230317@mydesk.domain.cxm>
[not found] ` <20161206104020.6b2ebb30@eto-mona.office.smartweb.sk>
[not found] ` <20161206102637.1ddd152a@mydesk.domain.cxm>
[not found] ` <20161207155638.4b2dd629@eto-mona.office.smartweb.sk>
[not found] ` <630ace89-e29b-d0d3-9f15-110d8dc3de08@NTLWorld.com>
[not found] ` <20161208132842.5d7940bd@eto-mona.office.smartweb.sk>
2016-12-08 20:23 ` Jonathan de Boyne Pollard
2016-12-11 12:46 ` Jilles Tjoelker
2016-12-11 17:54 ` Konstantin Belousov [this message]
2016-12-11 22:23 ` Jilles Tjoelker
2016-12-12 11:12 ` Konstantin Belousov
2016-12-13 12:39 ` Jonathan de Boyne Pollard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161211175451.GV54029@kib.kiev.ua \
--to=kostikbel@gmail.com \
--cc=J.deBoynePollard-newsgroups@NTLWorld.com \
--cc=freebsd-hackers@freebsd.org \
--cc=jilles@stack.nl \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).