svn commit: r221068 - projects/portbuild/sources

Kostik Belousov kostikbel at gmail.com
Tue Apr 26 15:53:24 UTC 2011


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
> 
> Log:
>   portbuild: use SIGKILL for ptimeout/pnohang.
>   
>   As requested by Pav.
> 
> Modified:
>   projects/portbuild/sources/pnohang.c
>   projects/portbuild/sources/ptimeout.c
> 
> Modified: projects/portbuild/sources/pnohang.c
> ==============================================================================
> --- projects/portbuild/sources/pnohang.c	Tue Apr 26 15:11:12 2011	(r221067)
> +++ projects/portbuild/sources/pnohang.c	Tue Apr 26 15:11:13 2011	(r221068)
> @@ -70,7 +70,7 @@ main(int argc, char *argv[])
>  		    sv.sa_handler = SIG_IGN;
>  		    sigemptyset(&sv.sa_mask);
>  		    sv.sa_flags = 0;
> -		    sigaction(SIGTERM, &sv, 0);
> +		    sigaction(SIGKILL, &sv, 0);
sigaction(SIGKILL) does not make any sense, you cannot ignore SIGKILL.

>  
>  		    /* parent */
>  		    child = wait(&status);
> @@ -78,10 +78,10 @@ main(int argc, char *argv[])
>  
>  		    if (pid1 == 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);
> 
> Modified: projects/portbuild/sources/ptimeout.c
> ==============================================================================
> --- projects/portbuild/sources/ptimeout.c	Tue Apr 26 15:11:12 2011	(r221067)
> +++ projects/portbuild/sources/ptimeout.c	Tue Apr 26 15:11:13 2011	(r221068)
> @@ -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 = 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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20110426/dc997967/attachment.pgp


More information about the svn-src-projects mailing list