cvs commit: src/sys/kern tty_pts.c

Ed Schouten ed at FreeBSD.org
Tue Sep 23 17:12:37 UTC 2008


ed          2008-09-23 17:12:25 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             tty_pts.c 
  Log:
  SVN rev 183308 on 2008-09-23 17:12:25Z by ed
  
  Track state to determine if the associated TTY device node has been used.
  
  It turns out our old TTY layer (and other implementations) block when
  you read() on a PTY master device of which the slave device node has not
  been opened yet. Our new implementation just returned 0. This caused
  applications like telnetd to die in a very subtle way (when child
  processes would open the TTY later than the first call to select()).
  
  Introduce a new flag called PTS_FINISHED, which indicates whether we
  should block or bail out of a read() or write() occurs.
  
  Reported by:    Claude Buisson <clbuisson orange fr>
  
  Revision  Changes    Path
  1.23      +19 -4     src/sys/kern/tty_pts.c


More information about the cvs-src mailing list