From owner-svn-src-all@FreeBSD.ORG Mon Aug 19 19:45:05 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2DB1F0E; Mon, 19 Aug 2013 19:45:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78D01249B; Mon, 19 Aug 2013 19:45:04 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r7JJiidV053184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Aug 2013 04:44:54 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r7JJigML088411; Tue, 20 Aug 2013 04:44:44 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 20 Aug 2013 04:36:42 +0900 (JST) Message-Id: <20130820.043642.437041865864892383.hrs@allbsd.org> To: oshogbo@FreeBSD.org Subject: Re: svn commit: r254440 - head/usr.sbin/rwhod From: Hiroki Sato In-Reply-To: <521267C2.60001@FreeBSD.org> References: <201308170712.r7H7CrYi089636@svn.freebsd.org> <521267C2.60001@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Aug_20_04_36_42_2013_561)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 20 Aug 2013 04:44:54 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 19:45:05 -0000 ----Security_Multipart(Tue_Aug_20_04_36_42_2013_561)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mario Oshogbo 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)----