DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

M_HANGUP(D7str)


M_HANGUP, M_TRAIL -- report that the driver can no longer send data upstream

Description

The M_HANGUP message type is sent upstream by a driver to report that it can no longer send data upstream. This might be because of an error or the dropping of a remote line connection. When the message reaches the Stream head, the Stream is marked so that all subsequent write and putmsg system calls issued to the Stream will fail and return an ENXIO error. Those ioctls that cause messages to be sent downstream are also failed. POLLHUP is set if the Stream is being polled (see poll).

Subsequent read or getmsg calls to the Stream will not generate an error. These calls will return any messages (according to their function) that were on, or in transit to, the Stream head read queue before the M_HANGUP message was received. When all such messages have been read, read returns 0, and getmsg sets each of its two length fields to 0.

The M_HANGUP message also causes a SIGHUP signal to be sent to the process group if the device is a controlling tty (see M_SIG).

The M_TRAIL message type marks the end of data after an M_HANGUP message.

Message type

M_HANGUP is a priority message; M_TRAIL is an ordinary message.

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

For the M_HANGUP message type only, oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

Differences between versions

M_TRAIL is not implemented in ODDI.

References

streamio
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005