home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / sysv386 / 17403 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.3 KB

  1. Path: sparky!uunet!mcsun!uknet!vision!jim
  2. From: jim@visionware.co.uk (Jim Musgrave)
  3. Newsgroups: comp.unix.sysv386
  4. Subject: Pseudo-tty pairs on SCO V.3.2R4
  5. Message-ID: <1992Dec15.102805.12050@visionware.co.uk>
  6. Date: 15 Dec 92 10:28:05 GMT
  7. Sender: jim@visionware.co.uk (Jim Musgrave)
  8. Organization: VisionWare Ltd., Leeds, UK
  9. Lines: 25
  10.  
  11. Hello everyone,
  12.  
  13.  
  14. I have a simple application which has two processes.  One opens the master side
  15. of a pseudo-tty and issues a read.  The other opens the slave side.  The 
  16. master side has the O_NONBLOCK flag set, the read on the master side 
  17. returns 0 when there is no data (EOF?), and 0 when the slave side is closed.
  18.  
  19. When I issue a select on this file descriptor, it returns implying it is 
  20. readable, when I issue a read, it returns 0.  This somewhat defeats the
  21. object of using select.
  22.  
  23. How can I tell the slave side has been closed?  
  24.  
  25. (I have the same piece of code running on Interactive 386ix, read and select
  26. behave as you would expect, thus I can tell when the slave side is no longer
  27. open and I can determine whether there is data available or not)
  28.  
  29. Any ideas?
  30.  
  31. Jim.
  32. -- 
  33.          VISIONWARE LTD, 57 Cardigan Lane, LEEDS LS4 2LE, England
  34.     Tel +44 532 788858.  Fax +44 532 304676.  Email jim@visionware.co.uk
  35. -------------- "VisionWare:   The home of DOS/UNIX/X integration" -------------
  36.