home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aux / 3378 < prev    next >
Encoding:
Text File  |  1992-09-07  |  2.2 KB  |  45 lines

  1. Newsgroups: comp.unix.aux
  2. Path: sparky!uunet!mcsun!Germany.EU.net!ubrinf!thomas
  3. From: thomas@mathematik.uni-Bremen.de (Thomas Eberhardt)
  4. Subject: Re: csh is screwed up
  5. Message-ID: <thomas.715644705@mathematik.uni-Bremen.de>
  6. Sender: news@informatik.uni-bremen.de (NEWS Service)
  7. Nntp-Posting-Host: 134.102.232.14
  8. Organization: Univ. Bremen, Informatik
  9. References: <1992Aug27.171503.794@colorado.edu> <1992Aug29.085228.2232@panix.com> <1992Aug31.171710.2035@colorado.edu> <thomas.715639089@mathematik.uni-Bremen.de>
  10. Date: Fri, 4 Sep 1992 22:11:45 GMT
  11. Lines: 32
  12.  
  13. Oops... just wrote a little test program to explore various combinations
  14. of compatibility flags with respect to interrupted system calls.  Here are
  15. the results:
  16.  
  17. COMPAT_SVID  COMPAT_BSD  COMPAT_POSIX  set42sig  result
  18. (or -lsvid)  (or -lbsd)  (or -lposix)
  19. -------------------------------------------------------
  20.      X                                           EINTR
  21.                   X                                OK
  22.                               X                  EINTR
  23.      X                                    X        OK
  24.                   X                       X        OK
  25.                               X           X      EINTR    <=== !!!
  26.  
  27. The last line explains the mysterious problems with the csh.
  28. It means that programs that call set42sig to get the COMPAT_SYSCALLS
  29. feature will fail when they are executed from programs that are linked
  30. against -lposix (this is because all these composite flags and libraries
  31. set COMPAT_EXEC). This includes for example my entire X11R5 distribution
  32. and the tcsh binary I placed on wuarchive. I've verified this by
  33. executing the csh script under an xterm running the tcsh. In this case
  34. the script sometimes fails as expected. But when executing the csh script
  35. from a sh (with sets COMPAT_SVID) everything works fine. I have looked
  36. at the csh with adb and indeed the csh only calls set42sig.
  37.  
  38. Morale of the story: If you REALLY want BSD behaviour FORGET set42sig()
  39.                      and use setcompat(COMPAT_BSD) or -lbsd.
  40. --
  41. thomas@mathematik.uni-Bremen.de  | Institut fuer dynamische Systeme
  42. Thomas Eberhardt                 | Universitaet Bremen, FB 3, Postfach 330 440
  43. Koelner Str. 4, W-2800 Bremen 41 | W-2800 Bremen 33, Germany
  44. Phone: +49 421 472527            | FAX: +49 421 218-4236
  45.