How to distinguish between STREAMS and non-STREAMSD
Keith Holder
khh at root.co.uk
Fri Jan 25 22:10:41 AEST 1991
>josef at nixpbe.nixdorf.de (josef Moellers) writes:
>>Does anybody now of a bulletproof and FAST method to distinguish between
>>a STREAMS fd and a non-STREAMS fd?
>>I cannot use calls to getmsg/putmsg, as I am not allowed to change the
>>state of the STREAM.
In System V Release 4, there is a library function called isastream(3C), which
takes a file descriptor as an argument. It returns 1 if fildes represents a
STREAMS file, 0 if not. It behaves very much like isatty().
I don't know whether this function was available in previous releases.
--
--
Keith Holder, Systems Software Consultant, UniSoft Ltd.
<khh at root.co.uk> G1ITH Fax: (071) 729 3273
Phone: +44 71 729 3773
More information about the Comp.unix.internals
mailing list