Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!pyrltd!root44!khh From: khh@root.co.uk (Keith Holder) Newsgroups: comp.unix.internals Subject: Re: How to distinguish between STREAMS and non-STREAMSD Message-ID: <2585@root44.co.uk> Date: 25 Jan 91 11:10:41 GMT References: <15839.279e0b86@levels.sait.edu.au> Organization: UniSoft Ltd., London, England Lines: 16 >josef@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. G1ITH Fax: (071) 729 3273 Phone: +44 71 729 3773