reading standard output

George Robbins grr at cbmvax.commodore.com
Sun Oct 14 09:58:43 AEST 1990


In article <21072 at versatc.versatec.COM> tamura at 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 at cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)



More information about the Comp.unix.ultrix mailing list