home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / vms / 17812 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.7 KB

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