home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / volume.30 / text0079.txt < prev    next >
Encoding:
Text File  |  1993-03-11  |  1.1 KB  |  31 lines

  1. Submitted-by: trt@cs.duke.edu (Tom Truscott)
  2.  
  3. (This article is largely AIX-specific.)
  4.  
  5. BSD 4.2 added restart support for system calls to avoid the problem
  6. you describe.  You can avoid the EINTR behavior in *your* programs by
  7. linking your AIX programs with "-lbsd" to get the BSD flavor of signal().
  8.  
  9. For fine grained control of this, see the SA_RESTART bit in "man sigaction".
  10. That is the POSIX way, I think.
  11.  
  12. You can also use the BSD-style sigvec() but only if you link -lbsd (?!).
  13. Also do "man siginterrupt" for yet another way to get finer grained control.
  14. And "grep restart /usr/lpp/bos/*".
  15.  
  16. Unfortunately, for some plausible-sounding but bogus reason AIX uses
  17. SV_INTERRUPT behavior by default.  To demonstrate the problem, do the
  18. following:
  19.  
  20.     tar cf - /usr/lpp/info | dd of=/dev/null &
  21.  
  22. Then type ^Z and fg repeatedly until dd fails with an error message.
  23. If this had been an important pipeline, you would now be SOL.
  24. Please report this as a bug via aixserv, and also point out
  25. the documentation error in "man siginterrupt" -- it restarts *system calls*
  26. not "subroutines"!
  27.  
  28.  
  29. Volume-Number: Volume 30, Number 80
  30.  
  31.