how to tell if a descriptor is a streams device ??

Richard Stevens stevens at hsi.UUCP
Sun Feb 5 21:21:13 AEST 1989


Is there a "best" way to tell if a given descriptor refers to
a streams device ??  I've found that none of the simple ioctl's
listed in streamio(7) return the "Not a streams device" (errno=60)
error, which is the error message I'd like to get.  The poll(2) system
call appears to return POLLHUP (hang up) if the descriptor isn't a
streams device.  The getmsg(2) system call does give you the right
error, but you may not want to get a message.  I didn't see anything
on the stat(2) man page that would give you a clue.

	Richard Stevens
	Health Systems International, New Haven, CT
	   stevens at hsi.com
           ... { uunet | yale } ! hsi ! stevens



More information about the Comp.sys.att mailing list