home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3814 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.3 KB

  1. Xref: sparky comp.unix.wizards:3814 comp.unix.questions:10778
  2. Newsgroups: comp.unix.wizards,comp.unix.questions
  3. Path: sparky!uunet!mcsun!sun4nl!htsa!miquels
  4. From: miquels@htsa.aha.nl (Miquel van Smoorenburg)
  5. Subject: Re: reliable signals under BSD / SVR4
  6. Message-ID: <1992Sep6.091651.3134@htsa.aha.nl>
  7. Keywords: signals, reliable, software interrupts
  8. Organization: Algemene Hogeschool Amsterdam, The Netherlands
  9. References: <Btwqvs.LAI@zeus.dialix.oz.au> <acourtny.715556934@unix1.tcd.ie> <1992Sep3.231707.17858@noao.edu>
  10. Date: Sun, 6 Sep 1992 09:16:51 GMT
  11. Lines: 36
  12.  
  13. In article <1992Sep3.231707.17858@noao.edu> rstevens@noao.edu (W. Richard Stevens) writes:
  14. >>Has anyone investigated other models for signal delivery?
  15. >
  16. >In the SVR4 sigaction(2) man page under SA_SIGINFO it says that the
  17. >signals are "reliably queued."  Apparently SVR4 can provide queued
  18. >signals, but someone-in-the-know told me that Sun made AT&T take this
  19. >feature out (when they were working on SVR4 together).  Perhaps POSIX.4
  20. >will have them put it back in ...
  21. >
  22. >>Come to think of it, doesn't it make it somewhat "tricky" to use
  23. >> async. I/O at all?
  24. >
  25. >I've yet to find a real application that actually uses BSD's SIGIO.
  26. >Has anyone seen one?
  27. >
  28. >    Rich Stevens  (rstevens@noao.edu)
  29.  
  30. Some time ago I ported the trs80 emulator for X (xtrs) to Linux. It wasn't
  31. very difficult, except that it used SIGIO to catch keyboard events.
  32. And Linux (or all other non-BSD systems, for that matter) doesn't have
  33. SIGIO. So at the initialization, the process fork()s and then the child
  34. process does a select() on the fd #0. When it receives data, it sends a
  35. SIGIO (#define SIGIO SIGUSR1) to it's parent, and hits itself
  36. with SIGSTOP. Then, when the parent is done reading the data in the signal
  37. handler, it sends it's child the SIGCONT signal and it's ready to roll
  38. again. Neat eh?
  39.  
  40. Mike.
  41. --
  42. %     Miquel van Smoorenburg, Baljuwstraat 20, 2461SL Langeraar, Holland.     %
  43. %   miquels@htsa.aha.nl (school)       miquels@drinkel.nl.mugnet.org (home)   %
  44. %                   Calm down - it's just ones and zeros                      %
  45. -- 
  46. %     Miquel van Smoorenburg, Baljuwstraat 20, 2461SL Langeraar, Holland.     %
  47. %   miquels@htsa.aha.nl (school)       miquels@drinkel.nl.mugnet.org (home)   %
  48. %                   Calm down - it's just ones and zeros                      %
  49.