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.715639089@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>
- Date: Fri, 4 Sep 1992 20:38:09 GMT
- Lines: 40
-
- powellb@samwise.colorado.edu (Brian Powell) writes:
-
- [...]
- >#!/bin/csh -f
- >set test = `/bin/pwd`
- >echo $test
- >exit
-
- >There, everything is explicit, and should work for everybody. However, it will
- >only work on my A/UX 3.0, Mac IIfx, with 16 megs erratically. I ran it 10 times, consecutively, and it worked 3 out of the ten. The others, it never
- >executed the pwd command. I ran it both under csh and tcsh with the same
- >results. I realize that this should work for everybody; however, has anyone
- >else had this problem or resolved a similar one?
-
- I just tried it on my IIfx, 20MB, A/UX 3.0. It also sometimes fails on
- my machine. The echo is indeed executed every time. I've verified it by
- changing the echo to "echo x $test". It seems the csh is sometimes missing
- the output from /bin/pwd. This very much looks like the problems I had with
- emacs, which were caused by interrupted systems calls and the usage of
- SIGCHLD inside emacs. Emacs includes workarounds (#defines for read, write,
- etc.) for this problems, but these don't catch the problem inside the C
- library. So I recently replaced the offending system calls directly with
- new version that reissue the system call if it fails with EINTR.
- This solved my problems. I think that the csh (since it comes from BSD
- where EINTR to my knowledge isn't known) has probably the same problem with
- the usage of asynchronous child status change (SIGCHLD) handling that
- sometimes interrupts the read system call of the backquote operator at
- bad times, so that the output of the child gets lost.
-
- Yes, I've read setcompat(2), that states that COMPAT_SYSCALLS disables
- this nasty EINTR. But this doesn't cured my problems with emacs (which
- anyway calls set42sig at the very beginning and so selects COMPAT_SYSCALLS).
-
- PS: Sorry, if this is already discussed, but our news system is currently
- 5 days behind the rest of the world... :-(
- --
- 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
-