help needed opening/fopening /dev/tty??

kirk reiser kirk at braille.UWO.CDN
Thu Aug 4 05:07:32 AEST 1988


We have been writing a daemon to spool output to a braille printer.  But 
if we try to open or fopen the device when the printer is not turned on 
fopen hangs waiting for the printer.  I would like to know if there is a 
way to test the device before trying to do an open on it.  The way it stands
right now I can't put the program in cron because the process will just stay
there until someone get around to turning on the printer.  This would not be
a problem except when the braille printer is turned on some setup must be
done on it before printing can start.  This is an old printer so it really
has no smarts as far as handshaking and the like.  What happens now is if
the printer is turned on when the process is waiting the spooled files start
being downloaded imediately and a lot of stuff is lost.  All the functions
I have been able to find to test the device seem to require the device file
be open so a file pointer or descriptor can be passed as an option.  Any
help would be appreciated.

  Kirk
BTW I am running V7.
-- 
	Kirk Reiser			The Computer Braille Facility
phone:	519-661-3061			University of Western Ontario
email:	kirk at braille.uwo.cdn		rm-H045 Health Sciences Addition
bitnet:	kirk at braille.uwocc1.bitnet	London, Ont. N6A 5C1



More information about the Comp.unix.wizards mailing list