tamura@versatc.versatec.COM (Mark Tamura) (10/13/90)
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, ... ) i'm on a decstation 3100 with ultrix v4.0 thanks, mt. -- Versatec, A Xerox Company INET: Mark_S_Tamura.SCB1Versatec@Xerox.COM 2710 Walsh Avenue, MS 1-7 UUCP: {ames,pyramid,sun}!versatc!tamura Santa Clara, CA 95051 AT&T: (408)988-2800 x5202
grr@cbmvax.commodore.com (George Robbins) (10/14/90)
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)