[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: signal masks and select
From:       Terry Lambert <terry () lambert ! org>
Date:       1996-01-31 20:47:05
[Download RAW message or body]

> 
> This can be "solved" by using setjmp/longjmp with select.
> ie 
> 	if (setjmp (env, 1) == 0)
> 	{
> 		set_sigmask(unblock desired signals)
> 		select(...)
> 	}
> 
> and your signal handler does a longjmp (env)
> 
> There are drawbacks to this.. If you want to unblock signals outside of the 
> select, you must keep extra state information around, so that the signal handler
> knows whether to do a normal return or a longjmp.
> 
> May not be elegant, but it is surely better than using non portable methods.
> Actually is this truely portable? Will all unicies support longjmp from a 
> signal handler?

sigaction should be portable to all POSIX platforms.

siginterrupt should be portable to all BSD platforms starting with 4.2
Ultrix.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic