Xref: utzoo unix-pc.general:2204 comp.sys.att:5484 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!unmvax!tut.cis.ohio-state.edu!rutgers!bpa!cbmvax!vu-vlsi!devon!stb!michael From: michael@stb.UUCP (Michael) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: termio(7) and read(2) problem! Message-ID: <10652@stb.UUCP> Date: 7 Feb 89 22:50:56 GMT References: <137@zebra.UUCP> <7411@chinet.chi.il.us> Reply-To: michael@stb.UUCP (Michael) Distribution: na Organization: STB BBS, La, Ca, Usa, +1 213 459 7231 Lines: 23 In article <7411@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: >In article <137@zebra.UUCP> vern@zebra.UUCP (Vernon C. Hoxie) writes: >> >> I have been trying to write a test program for a Trailblazer. >>It is connected to /dev/tty000. The program opens this file with: >> >> fd = open("/dev/tty000", O_RDWR | O_NDELAY); > >You probably need to use fcntl() to turn off the O_NDELAY before >trying to use the port (set CLOCAL first if you need it). Write()s >don't wait for the hardware to be ready if you leave O_NDELAY >set and strange things happen. I have seen code that indicated that >a close(open(/dev/ttywhatever,2) was needed to force the mode to >changed. Does anyone know which versions of unix require this? > >Les Mikesell Does anyone know how to turn ON NDELAY for an already open file? Michael : --- : Michael Gersten uunet.uu.net!stb!michael : crash!gryphon!denwa!stb!michael : Coff Coff <=== Stop smoking.