Date: Wed, 31 Jan 1996 13:47:05 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: paul@sfe.com.au (Paul Hatchman) Cc: leisner@sdsp.mc.xerox.com, linux-kernel@vger.rutgers.edu, hackers@FreeBSD.ORG Subject: Re: signal masks and select Message-ID: <199601312047.NAA10480@phaeton.artisoft.com> In-Reply-To: <199601310749.AA28625@rex.sfe.com.au> from "Paul Hatchman" at Jan 31, 96 06:49:00 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601312047.NAA10480>