AUX, signal, and sigvec
Doug Tody NOAO/IRAF CCS
tody at noao.edu
Mon May 6 05:27:32 AEST 1991
>From article <1497 at h.cs.wvu.wvnet.edu>, by schiebel at cs.wvu.wvnet.edu (Darrell Schiebel):
> I am tring to get signal trapping working on some code I'm porting to AUX.
> Here is the code I'm using (the entire code is at the end of message):
>
> svec.sv_flags = 0;
> svec.sv_mask = 0xffffff;
> svec.sv_handler = catcher;
> if (sigvec(2,&svec,0) == -1){
>
> Where "catcher" is the signal handler. I`ve tried other things for the
> "sv_mask",0 and 2. Does the mask indicate signals which get passed to
> handlers or signals which do not get passed? At any rate, the above code
> works when compiled on Suns but not when compiled on A/UX. I get the error
> invalid argument when I make the call to sigvec. Any suggestions?
By chance I had much the same problem the other day... Executing the
following code during process startup made the problem go away (sigvec is
a BSD system call):
#include <compat.h>
setcompat (COMPAT_BSD);
The tells the kernel to use BSD semantics for the A/UX system calls, instead
of SVID, which is the default (actually the call shown affects more than
just the signal stuff, but that is probably what you want if you are porting
from a Sun).
--
Doug Tody, National Optical Astronomy Observatories, Tucson AZ, 602-325-9217
UUCP: {arizona,decvax,ncar}!noao!tody or uunet!noao.edu!tody
Internet: tody at noao.edu SPAN/HEPNET: NOAO::TODY (NOAO=5355)
More information about the Comp.unix.aux
mailing list