Unbufferred file I/O
Ben Humphreys
cline at pnet01.cts.com
Sat May 14 16:17:00 AEST 1988
As I have not been able to get any versions of talk to run on my SCO system, I
was forced to use write. But write is a bummer because it is bufferred. You
end up typing over top of each other. With program bundle.c in hand, I fig-
ured it wouldn't be too hard to make it write one character at a time to the
tty and stay in interactive mode until EOF. Boy was I wrong. I ended up
using read() and write() to read from the local terminal and write to the
remote terminal. But, as far as I can tell, write() doesn't actually write
until it receives a newline / carriage return. Even if I close() and re
open() the /dev/ttynn file, it still won't flush it's buffer. Is there a way
for force write() to flush the buffer without requiring a newline / carriage
return. Or, optionally, is there a way to get one character from the local
terminal (unbufferred) and write said character to the local terminal (again,
unbufferred)?
Anyone got a version of talk.c to run under SCO 2.1.3???
UUCP: {cbosgd, hplabs!hp-sdd, sdcsvax, nosc}!crash!cline01!benh
ARPA: crash!cline01!benh at nosc.mil
INET: cline at pnet01.CTS.COM
More information about the Comp.unix.xenix
mailing list