Path: utzoo!attcan!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!levels!ccdn From: ccdn@levels.sait.edu.au Newsgroups: comp.unix.internals Subject: Re: How to distinguish between STREAMS and non-STREAMSD Message-ID: <15839.279e0b86@levels.sait.edu.au> Date: 23 Jan 91 22:17:42 GMT References: Organization: Sth Australian Inst of Technology Lines: 17 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. This is a guess, and right now I don't have the facilities to test it out. I assume that getmsg/putmsg will return errno = E_INVALID if you pass it a STREAMS fd? So why not assume that getmsg/putmsg will work, and test the return result; if you get errno = E_INVALID then try your STREAMS code; if that fails, and if you've got nothing else to try, then you're stuck. (But then, in that case you always would have been stuck, wouldn't you?) David Newall, who no longer works Phone: +61 8 344 2008 for SA Institute of Technology E-mail: ccdn@lux.sait.edu.au "Life is uncertain: Eat dessert first" *Check the return address!*