u...@stderr.spb.ru (Valery Ushakov) writes: >Solaris docs for (STREAMS-based) ptys say:
> When the master device is closed, an M_HANGUP message is sent to the > slave device to render the device unusable. The process on the slave > side gets the errno ENXIO when attempting to write on that stream, > but it will be able to read any data remaining on the stream head > read queue. When all the data has been read, read(2) returns 0, > indicating that the stream can no longer be used. M_HANGHUP also causes a SIGHUP signal to be sent to the controlling process. For interactive sessions that's the shell which intercepts the signal, resumes stopped jobs and passes the SIGHUP to them.