Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 18:15:56 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Florent Thoumie <flz@freebsd.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r221068 - projects/portbuild/sources
Message-ID:  <20110426151555.GT48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <201104261511.p3QFBD77027483@svn.freebsd.org>
References:  <201104261511.p3QFBD77027483@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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