Xref: utzoo comp.os.vms:4142 comp.unix.wizards:6160 Path: utzoo!utgpu!water!watmath!clyde!rutgers!lll-lcc!ames!ll-xn!adelie!axiom!insyte!jad From: jad@insyte.uucp (Jill Diewald) Newsgroups: comp.os.vms,comp.unix.wizards Subject: c signals with VMS Keywords: c signals fork exec subprocesses VMS LIB$SPAWN Message-ID: <127@insyte.uucp> Date: 19 Jan 88 23:23:43 GMT Organization: Innovative Systems (INSYTE), Newton, MA Lines: 47 I have an application in c which I am trying to port from UNIX to VMS. I am running into problems with the signal handling. The application starts a subprocess via a fork and an exec which it talks to though pipes. This part works fine. Both the parent and child use 'sigvec' ('sigvector' on UNIX) to setup their own specific signal handlers. This part works fine too. The problem happens when I use LIB$SPAWN to temporarily allow the user to go to the DCL prompt (like a subshell). When I do this the interrupt (^c) is turned off at the DCL level. I tried resetting the parent's interrupts to SIGDFL before doing the spawn but it had no effect. I'm not sure what is happening. None of the documentation for LIB$SPAWN mentions interrupts or signals. Where is it setting them from? The child? This seems unlikely. When I wrote a test program which didn't set any signals and simply did a spawn, the interrupt (^c) was on at the DCL prompt level. The second problem is when I return from the spawn. Everything is fine except the interrupt (^c) to the child seems to be turned off. I dumped the settings for all of the c signals, in both the parent and child process, and they were all the same as before the spawn. There has to be some magic interaction between the c signals and the VMS ones. I wrote a test program which set a handler for the interrupt signal, did a spawn. When control returned back to the program from the spawn, interrupts still worked! I must assume that my problem has to do with it being a child process, or due to the fork and exec and/or the pipe interaction between the two processes? Does anyone know exactly how the c signals correspound and interact with the VMS system ones? Can anyone explain this behavior or even better, tell me how to fix it? I'd appreciate any help. Jill Diewald Innovative Systems 1 Gateway Center Suite 910 Newton, MA 02158 phone: 617-965-8450 email: ...harvard!axiom!insyte!jad