[Vm-dev] Illumos port
eliot.miranda at gmail.com
Sat May 5 15:58:52 UTC 2012
On Sat, May 5, 2012 at 8:28 AM, Colin Putney <colin at wiresong.com> wrote:
> > Maybe this has something to do with what I found out a few years ago:
> > http://forum.world.st/Squeak-3-9-8-VM-problem-td105550.html
> Hi Andeas, that's exactly the issue I ran into; I'll try your fix. Thanks!
and Colin, the solution is #define signal(a, b) sigset(a, b). From
"It's amazing that there is so much misunderstanding about this.
If you want the old SunOS4.1 semantics of "signal", use "sigset" in
your Solaris 2.x programs.
i.e. sigset(SIGTERM, my_catch_it_fn);
This works just as "signal" used to in SunOX4.1. Signal will be caught
"reliably", i.e. new instances will be held until the current when is
completely handled, i.e. until the handler function finishes. At that
point, the hadnler will be automatically reinstalled.
If you are porting a SunOS4.1 program with 80,000 "signal" calls, just
#define signal(a, b) sigset(a, b)
Do NOT use "signal" in Solaris 2.x. Even if you reinstall the handler
the hadnler itself, it is possible to receive two signals in such quick
succession that you're program gets blown away before your handler is
Phew! By the way, this has been in SysV since 1987-ish. Solaris 2.x is
NOW, if you want "fancier", signal handling, you can use the sigaction /
sigsetmask stuff instead. Here you can automatically hold a whole set
of signals immediately upon receiving a single one.
Taos Mountain Software"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev