Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlvd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!rlvd!asw From: asw@rlvd.UUCP (Antony Williams) Newsgroups: net.sources Subject: /dev/stdin: credit where credit may be due? Message-ID: <595@rlvd.UUCP> Date: Tue, 25-Jun-85 20:05:48 EDT Article-I.D.: rlvd.595 Posted: Tue Jun 25 20:05:48 1985 Date-Received: Fri, 28-Jun-85 00:47:10 EDT Reply-To: asw@rlvd.UUCP (Antony Williams) Organization: Rutherford Appleton Laboratories, Atlas Buildings, U.K. Lines: 23 Xpath: warwick ubu Apologies to readers who feel that messages such as this should be kept out of net.sources - flames to /dev/null please. Several implementations of /dev/stdin, /dev/fdXX etc have recently appeared. It is worth pointing out that Jeff Smith (warwick) described exactly such a driver about two years ago at the inaugural meeting of the UKUUG, held at Westfield College in London. Jeff noted two main points in retrospect: freopen will close the file first, so that freopen(argv[1],"r", stdin) where argv[1]=="/dev/stdin" will not work as expected! opening a /dev/fdXX file with a different access type from that previously used may not have the desired effect. Apologies to Rob Pike if he did get there first! -------------------------------------------------- UK JANET: asw@uk.ac.rl.vd UK Usenet: {... | mcvax}!ukc!rlvd!asw ARPAnet: asw%rlvd@ucl-cs.arpa