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