Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2013 04:36:42 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        oshogbo@FreeBSD.org
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r254440 - head/usr.sbin/rwhod
Message-ID:  <20130820.043642.437041865864892383.hrs@allbsd.org>
In-Reply-To: <521267C2.60001@FreeBSD.org>
References:  <201308170712.r7H7CrYi089636@svn.freebsd.org> <521267C2.60001@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Tue_Aug_20_04_36_42_2013_561)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mario Oshogbo <oshogbo@FreeBSD.org> wrote
  in <521267C2.60001@FreeBSD.org>:

os> Thank you for your commit and sorry for not repair this problem earlier.
os>
os> > @@ -274,6 +274,15 @@ main(int argc, char *argv[])
os> >  		exit(1);
os> >  	if (!quiet_mode) {
os> >  		pid_child_receiver = pdfork(&fdp, 0);
os> > +		if (pid_child_receiver == -1) {
os> > +			if (errno != ENOSYS) {
os> > +				syslog(LOG_ERR, "pdfork: %m");
os> > +				exit(1);
os> > +			} else {
os> > +				pid_child_receiver = fork();
os> > +				fdp = -1;
os> > +			}
os> > +		}
os>
os> We can't do it this way. pdfork() is used there to prevent killing only
os> one process. If we use fork() and we kill parent process the second
os> process (child process) will become a zombie process. I suggest to
os> revert this change. The changes that Pawel commit (r254486 (thx
os> jilles!!!) and r254480) should resolve all problems.

 When the parent process is killed, the child process will be an child
 process of init, not a zombie, and init calls waitpid() when it
 terminates (by SIGTERM, for example).  I agree that this should be
 improved, but I do not think removing fallback to fork(2) is a good
 idea if PROCDESC is still a kernel option.  Reverting will not solve
 the problem that it does not work with a kernel without PROCDESC.

-- Hiroki

----Security_Multipart(Tue_Aug_20_04_36_42_2013_561)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (FreeBSD)

iEYEABECAAYFAlISc8oACgkQTyzT2CeTzy1DXwCeKf8XqVVIqZWS8YPQf55/x1gS
2SsAoMddmWcqlffhb1IEHatYtH4WBSbh
=V7YU
-----END PGP SIGNATURE-----

----Security_Multipart(Tue_Aug_20_04_36_42_2013_561)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130820.043642.437041865864892383.hrs>