home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os9 / 1203 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.0 KB

  1. Path: sparky!uunet!sun-barr!ames!agate!beirut.berkeley.edu!kientzle
  2. From: kientzle@beirut.berkeley.edu (Tim Kientzle)
  3. Newsgroups: comp.os.os9
  4. Subject: Re: Strange problem with setjmp()/longjmp() in OS9
  5. Date: 4 Sep 1992 00:54:48 GMT
  6. Organization: University of California, Berkeley
  7. Lines: 9
  8. Message-ID: <186c4oINNro6@agate.berkeley.edu>
  9. References: <87473@netnews.upenn.edu> <v1O85FG@keihh.hanse.de>
  10. NNTP-Posting-Host: beirut.berkeley.edu
  11. Summary: Signal handlers are special cases, aren't they?
  12.  
  13. Mark Elliot (mark@ginger.biophys.upenn.edu) writes:
  14. >>    I am programming in OS-9 v2.3 and cannot get setjmp()/longjmp() to
  15. >>behave. I would like my signal handling routine to call longjmp() to branch
  16. >>to a location in my main() routine as set by setjmp().
  17.    Since longjmp() works by rolling back the stack, I would personally
  18. expect that there's no way to implement setjmp/longjmp to do what you
  19. want, i.e. be usable from within a signal handler.  Remember that YOU
  20. didn't call the signal handler (the system did), so rolling back the
  21. stack doesn't make sense.
  22.