svn commit: r214506 - head/lib/libthr/thread

David Xu davidxu at FreeBSD.org
Fri Oct 29 09:35:37 UTC 2010


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

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


More information about the svn-src-head mailing list