diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2000-11-14 20:00:19 +0000 | 
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2000-11-14 20:00:19 +0000 | 
| commit | eb4463fde63561149e643ee41e628f39ae4937e0 (patch) | |
| tree | c790d28d618d13dec634f12a032747e5a827e911 /lib/libpthread/thread/thr_init.c | |
| parent | fa167b8eaaf71290da0299e6320d4d4b6c85177b (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_init.c')
| -rw-r--r-- | lib/libpthread/thread/thr_init.c | 15 | 
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index 35731c42cbd6..be671a139c42 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -92,7 +92,6 @@ _thread_init(void)  	int		mib[2];  	struct clockinfo clockinfo;  	struct sigaction act; -	struct sigaltstack alt;  	/* Check if this function has already been called: */  	if (_thread_initial) @@ -281,11 +280,15 @@ _thread_init(void)  		/* Clear the signal queue: */  		memset(_thread_sigq, 0, sizeof(_thread_sigq)); -		/* Create and install an alternate signal stack: */ -		alt.ss_sp = malloc(SIGSTKSZ);	/* recommended stack size */ -		alt.ss_size = SIGSTKSZ; -		alt.ss_flags = 0; -		if (_thread_sys_sigaltstack(&alt, NULL) != 0) +		/* +		 * Create and install an alternate signal stack of +		 * the recommended size: +		 */ +		_thread_sigstack.ss_sp = malloc(SIGSTKSZ); +		_thread_sigstack.ss_size = SIGSTKSZ; +		_thread_sigstack.ss_flags = 0; +		if ((_thread_sigstack.ss_sp == NULL) || +		    (_thread_sys_sigaltstack(&_thread_sigstack, NULL) != 0))  			PANIC("Unable to install alternate signal stack");  		/* Enter a loop to get the existing signal status: */  | 
