home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: jfh@rpp386.uucp (John F. Haugh II)
-
- In article <1mjjl5INNkj6@ftp.UU.NET> salevin@dal.mobil.com (S. A. Levin [Stewart]) writes:
- >I noticed a few months ago that every once in a while my pipelined jobs
- >on our RS6000 would break when I tried to put them into the background
- >under csh. A few days ago IBM customer support tracked down what was
- >happening. They say that under POSIX if a signal (e.g. SIGTSTP) is
- >received during a read() system call that has not yet received any
- >characters, the read must return an -1 count and set EINTR. (This is
- >not specific to csh.)
-
- The problem is that job control involves the sending and receiving of
- signals. The process which has preformed the read from the pipe is going
- to be sent a SIGTSTP (just as it would be sent a SIGINT or SIGQUIT if
- it INTR or QUIT were pressed). Because the default behavior for SIGTSTP
- is not "exit", as it is for SIGINT and SIGQUIT, this bizarre action
- occurs. That is, read() gets to return EINTR instead of the process
- being forced to exit. In short, if you set up a signal catching function
- for SIGINT and pressed the INTR key, you would (from time to time) get
- the same exact behavior with pipelines. You might be less surprised by
- this scenario, but the two have the same roots.
-
- >To me this is an unacceptable interaction between job control and POSIX
- >compliance. In particular, the possibility of losing hours of work (as
- >I did once!) is not acceptable. What would it take to solve this
- >problem?
-
- The solution is to throw away POSIX job control. Many people who've
- tried to implemented POSIX-style (or BSD-style for that matter) job
- control have voiced their displeasure (and I've done it so now I get to
- complain too). POSIX job control is not bullet-proof in any sense.
-
- Another solution is to get one of the "multiple sessions per physical
- connection" programs from the net or to pursuade IBM to provide something
- akin to "shell layers." The programs which come to mind are "screen",
- "wm" and "sm". IBM would have to provide SXT's in order to do shell
- layers, unless they used PTYs instead.
- --
- John F. Haugh II [ PGP 2.1 ] !'s: ...!cs.utexas.edu!rpp386!jfh
- Ma Bell: (512) 251-2151 [ DoF #17 ] @'s: jfh@rpp386.cactus.org
- Rich white environmentalists aren't dying every year from malaria. Millions of
- blacks in Africa are. DDT was an effective tool in the fight against malaria.
-
-
- Volume-Number: Volume 30, Number 81
-
-