From owner-svn-src-projects@FreeBSD.ORG Tue Apr 26 15:53:24 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213BA1065672; Tue, 26 Apr 2011 15:53:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 960F98FC13; Tue, 26 Apr 2011 15:53:23 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3QFFuc5063853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Apr 2011 18:15:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3QFFu5Z045176; Tue, 26 Apr 2011 18:15:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3QFFucc045175; Tue, 26 Apr 2011 18:15:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 26 Apr 2011 18:15:56 +0300 From: Kostik Belousov To: Florent Thoumie Message-ID: <20110426151555.GT48734@deviant.kiev.zoral.com.ua> References: <201104261511.p3QFBD77027483@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w1WLgcEPVIWvtHEy" Content-Disposition: inline In-Reply-To: <201104261511.p3QFBD77027483@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221068 - projects/portbuild/sources X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 15:53:24 -0000 --w1WLgcEPVIWvtHEy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 03:11:13PM +0000, Florent Thoumie wrote: > Author: flz > Date: Tue Apr 26 15:11:13 2011 > New Revision: 221068 > URL: http://svn.freebsd.org/changeset/base/221068 >=20 > Log: > portbuild: use SIGKILL for ptimeout/pnohang. > =20 > As requested by Pav. >=20 > Modified: > projects/portbuild/sources/pnohang.c > projects/portbuild/sources/ptimeout.c >=20 > Modified: projects/portbuild/sources/pnohang.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- projects/portbuild/sources/pnohang.c Tue Apr 26 15:11:12 2011 (r22106= 7) > +++ projects/portbuild/sources/pnohang.c Tue Apr 26 15:11:13 2011 (r22106= 8) > @@ -70,7 +70,7 @@ main(int argc, char *argv[]) > sv.sa_handler =3D SIG_IGN; > sigemptyset(&sv.sa_mask); > sv.sa_flags =3D 0; > - sigaction(SIGTERM, &sv, 0); > + sigaction(SIGKILL, &sv, 0); sigaction(SIGKILL) does not make any sense, you cannot ignore SIGKILL. > =20 > /* parent */ > child =3D wait(&status); > @@ -78,10 +78,10 @@ main(int argc, char *argv[]) > =20 > if (pid1 =3D=3D child) { > DPRINTF("killing process %d (second child)\n", pid2); > - kill(pid2, SIGTERM); > + kill(pid2, SIGKILL); > } else { > DPRINTF("killing process %d (first child)\n", pid1); > - kill(pid1, SIGTERM); > + kill(pid1, SIGKILL); > } > /* exit status in upper 8 bits, killed signal (if any) in > * lower 8 bits > @@ -98,9 +98,9 @@ main(int argc, char *argv[]) > printf("ps jgx before the signal\n"); > system("ps jgxww"); > sleep(1); /* give it a chance to output the message */ > - kill(pid1, SIGTERM); > + kill(pid1, SIGKILL); > sleep(1); > - kill(pid, SIGTERM); > + kill(pid, SIGKILL); > sleep(1); > system("ps jgxww"); > exit(1); >=20 > Modified: projects/portbuild/sources/ptimeout.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- projects/portbuild/sources/ptimeout.c Tue Apr 26 15:11:12 2011 (r2210= 67) > +++ projects/portbuild/sources/ptimeout.c Tue Apr 26 15:11:13 2011 (r2210= 68) > @@ -56,7 +56,7 @@ main(int argc, char *argv[]) > kill(pid2, SIGKILL); > } else { > DPRINTF("killing process %d\n", pid1); > - kill(pid1, SIGTERM); > + kill(pid1, SIGKILL); > } > /* exit status in upper 8 bits, killed signal (if any) > * in lower 8 bits > @@ -67,7 +67,7 @@ main(int argc, char *argv[]) > sleep(timeout); > t =3D time(NULL); > printf("ptimeout: killing %s (pid %d) since timeout of %d expired = at %s", args, pid1, timeout, ctime(&t)); > - kill(pid1, SIGTERM); > + kill(pid1, SIGKILL); > exit(1); > } > } else { --w1WLgcEPVIWvtHEy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk224asACgkQC3+MBN1Mb4jUDACfWjbI2kmrWf0wRy5t9DZj9r5B cMcAoOc7otKD9zFuVDic/haz/QEuUO6p =/VS2 -----END PGP SIGNATURE----- --w1WLgcEPVIWvtHEy--