Norton Allen wrote: > Under QNX, I am getting a failure on ext/POSIX/sigaction.t > subtest 13. The signal mask is not being properly restored > when sigaction returns early. I am happy to pursue and > patch for this, but I could really use some guidance. > > Apparently the plan is for POSIX.xs:1218: > > SAVEDESTRUCTOR(restore_sigmask, &osset); > > to take care of this, but it also appears that this is > not the mechanism used when sigaction does not return > early. > > How does SAVEDESTRUCTOR work? OK, it appears that the destructor saved with SAVEDESTRUCTOR is not executed until after the function has returned. Unfortunately osset is a *local* variable, so it is long out of scope and we're sending garbage to restore_sigmask and hence to sigprocmask. This requires a patch to ext/POSIX/POSIX.xs to make osset some sort of static variable. What is the right way to do this in XS? A pointer to any example would be most helpful. -Norton AllenThread Previous | Thread Next