Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 2010 11:18:14 +0300
From:      Andriy Gapon <avg@freebsd.org>
To:        David Xu <davidxu@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r214506 - head/lib/libthr/thread
Message-ID:  <4CCBD4C6.2070505@freebsd.org>
In-Reply-To: <201010290935.o9T9ZbXH089952@svn.freebsd.org>
References:  <201010290935.o9T9ZbXH089952@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 29/10/2010 12:35 David Xu said the following:
> Author: davidxu
> Date: Fri Oct 29 09:35:36 2010
> New Revision: 214506
> URL: http://svn.freebsd.org/changeset/base/214506
> 
> Log:
>   Return previous sigaction correctly.
>   
>   Submitted by:	avg

Thanks!

> Modified:
>   head/lib/libthr/thread/thr_sig.c
> 
> Modified: head/lib/libthr/thread/thr_sig.c
> ==============================================================================
> --- head/lib/libthr/thread/thr_sig.c	Fri Oct 29 09:23:26 2010	(r214505)
> +++ head/lib/libthr/thread/thr_sig.c	Fri Oct 29 09:35:36 2010	(r214506)
> @@ -547,7 +547,10 @@ _sigaction(int sig, const struct sigacti
>  
>  	if (oldact.sa_handler != SIG_DFL &&
>  	    oldact.sa_handler != SIG_IGN) {
> -		oldact = _thr_sigact[sig-1].sigact;
> +		if (act != NULL)
> +			oldact = oldact2;
> +		else if (oact != NULL)
> +			oldact = _thr_sigact[sig-1].sigact;
>  	}
>  
>  	_thr_rwl_unlock(&_thr_sigact[sig-1].lock);


-- 
Andriy Gapon



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