Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hanauma.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!hanauma!stew From: stew@hanauma.UUCP (Stewart Levin) Newsgroups: net.unix-wizards Subject: Re: Rumor about AT&T Validation Message-ID: <106@hanauma.UUCP> Date: Sat, 9-Aug-86 23:42:07 EDT Article-I.D.: hanauma.106 Posted: Sat Aug 9 23:42:07 1986 Date-Received: Mon, 11-Aug-86 04:20:08 EDT References: <2842@brl-smok.UUCP> Organization: Stanford U. Geophysics Lines: 14 ................................................................ I missed the beginning of this discussion, but for BSD Unix I never found any 100% sure-fire way of using fstat(2) to detect a pipe. The best I ever did was about 95% accuracy. To get 100% accuracy under 4.1BSD I cribbed a trick from tee(1) of lseek'ing on the file descriptor and checking for an ESPIPE error. 4.2 broke this by returning EINVAL but this is fixed in 4.3, I'm told, and also in one of my 4.2 Bug Reports distributed on the 84.2 Usenix tape. Now I'm just waiting for Convex's next system release.... ... decvax!hanauma!stew