home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / internal / 1952 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.6 KB  |  37 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!bcm!cs.utexas.edu!asuvax!ennews!anasaz!duane
  3. From: duane@anasazi.com (Duane Morse)
  4. Subject: setsid and streams/device driver output to controlling terminal
  5. Organization: Anasazi, Inc.  Phoenix, Arizona USA
  6. Date: Thu, 12 Nov 1992 18:15:09 GMT
  7. Message-ID: <1992Nov12.181509.18217@anasazi.com>
  8. Sender: usenet@anasazi.com (Usenet News)
  9. Lines: 26
  10.  
  11. On an NCR 3433, a program of mine which uses TCP/IP occasionally gets
  12. an "error 22" from t_open.  Running a system call trace (truss) shows that
  13. the errno error is 5 (EIO) upon return from ioctl(fd, I_FIND, "timod")
  14. (looking for the Transport Interface streams module, I presume).
  15.  
  16. An NCR rep has said that my program needs to use "setsid" because the
  17. streams driver is checking to see if it can put a message on the controlling
  18. terminal and it returns this error when it finds it cannot (the
  19. program and others in the same process group are running "nohup"
  20. and the initiator has logged off).
  21.  
  22. Though invoking "setsid" during program initialization does seem to get
  23. rid of the error return, I am reluctant to make it a permanent feature
  24. of the software because (1) I don't know what sort of error the
  25. ioctl is encountering, (2) I don't really understand how setsid()
  26. is fixing the problem, and (3) since I don't understand what is going on,
  27. I am concerned that there may be other situations with other pieces
  28. of software in which I should be using setsid to avoid a problem which
  29. might arise.
  30.  
  31. Any comments or clarifications?
  32.  
  33. -- 
  34.  
  35. Duane Morse    e-mail: duane@anasazi.com
  36. (602) 861-7609
  37.