Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!noao!tody From: tody@noao.edu (Doug Tody NOAO/IRAF CCS) Newsgroups: comp.unix.aux Subject: Re: AUX, signal, and sigvec Message-ID: <1991May5.192732.3868@noao.edu> Date: 5 May 91 19:27:32 GMT References: <1497@h.cs.wvu.wvnet.edu> Organization: National Optical Astronomy Observatories, Tucson, AZ, USA Lines: 30 From article <1497@h.cs.wvu.wvnet.edu>, by schiebel@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 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@noao.edu SPAN/HEPNET: NOAO::TODY (NOAO=5355)