home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!ames!agate!ucbvax!lrw.com!leichter
- From: leichter@lrw.com (Jerry Leichter)
- Newsgroups: comp.os.vms
- Subject: re: How do I send a control-c to another process?
- Message-ID: <9211112305.AA00235@uu3.psi.com>
- Date: 11 Nov 92 21:34:57 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 26
-
-
- Here's my situation: I have a 2 process system. The parent process
- is a graphical user interface written in C/Motif. This controls
- a fortran program that used to be command-line driven. The old fortran
- program used to trap control-c's. How can I get the gui to send a
- control-c to the child? The unix function kill(SIGINT,pid) does
- not support the same fuctionality under vms as it does under Unix.
-
- You don't explain how the parent process controls the FORTRAN program.
-
- If it creates a pseudo-terminal and uses that to start the FORTRAN program,
- then you can simply send a CTRL/C to the pseudo-terminal.
-
- If it uses mailboxes, directly or through the VAX C pipe emulation; or the
- pipe driver that came with the old VAX Shell; there's no way to do what you
- want. CTRL/C AST's are a product of the terminal driver. No controlling
- terminal, no CTRL/C AST's. You'd have to re-design the inter-process
- communication. (The several ways this kind of thing is done on VMS. One
- simple one is to have another mailbox for interrupt requests. The controlled
- program posts a QIO (not QIOW) to that mailbox early on, requesting an AST
- when the QIO completes. When the controlling process needs to send an
- interrupt, it writes an appropriate message to the interrupt mailbox. This
- causes the waiting QIO to complete, posting an AST to the process - which
- then does whatever is necessary.
- -- Jerry
-
-