home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.30 / text0080.txt < prev    next >
Encoding:
Text File  |  1993-03-11  |  2.4 KB  |  47 lines

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