Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!usc!apple!rutgers!cbmvax!grr From: grr@cbmvax.commodore.com (George Robbins) Newsgroups: comp.unix.ultrix Subject: Re: reading standard output Keywords: ultrix read stdout Message-ID: <15144@cbmvax.commodore.com> Date: 13 Oct 90 23:58:43 GMT References: <21072@versatc.versatec.COM> Reply-To: grr@cbmvax.commodore.com (George Robbins) Organization: Commodore, West Chester, PA Lines: 16 In article <21072@versatc.versatec.COM> tamura@versatc.versatec.COM (Mark Tamura) writes: > how do you read data from standard output? i'm writing a program that > sends data to a device and needs to read status back for error conditions. > > i've tried using the flags field in the iob, however i still get the > bad file (errno = 9) message on the read(1, ... ) Naughty, Naughty! See dup(2) and fdopen(3), you want to create a second path to the same device not try to force I/O on the the "output" stream. -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing: domain: grr@cbmvax.commodore.com Commodore, Engineering Department phone: 215-431-9349 (only by moonlite)