1) did a fflush() after every character sent
2) did a delay after every character sent
3) tried sending just one character at a time and not strings
with write(). trying sending the one character with the steps
mentioned above
nothing made a difference. I would have at least expected the delay to
do something different.
Thanks for any ideas!
jerry geis
Be careful mixing system calls with functions from the stdio library.
The calls open(), write(), read(), etc. don't work the same way as
fopen(), printf(), getchar(), etc. The system calls like open() work
with file descriptors (integers). The library functions like fopen()
work with FILE pointers. Compare the two entries in your manual.
Even if you are using the functions and system calls correctly, I don't
recommend mixing them. The STDIO functions use buffered I/O, and the
system calls don't.
How are you opening up? If you run the program from the same terminal
that the output goes to, you can just use stdin, stdout, and stderr
(FILE pointers), which are opened automatically when your program
starts to execute. Don't put any stuff to specifically open up a
particular tty unless that's what you really want.
You may want to pick up a good book on 'C' and UNIX. I really enjoyed
'The UNIX Programming Environment' by Kerningham & Pike. It covers the
Bourne shell, awk, make, stdio & system calls, and more in a easy and
readable style.
Good Luck!
----
James C. Graves Jr. p00...@psilink.com
Philosophical Consulting & Computer Repair