Author: K-mart CashierK-mart Cashier
Date: Jul 4, 2008 09:10
I just don't spend enough time "tinkering" with *nix. Anyhow when I
read from an unbuffered input and type something in, I get two prompts
after I hit return.
m-net%% more tty.c
#include
int main(void)
{
char c;
return(read(0, &c, 1) == 1) ? (unsigned char)c : EOF;
return 0;
}
m-net%% ./tty
c
m-net%%
m-net%%
Now when I buffer the input, and type something in, I only get one
prompt after I hit return.
m-net%% more tty2.c
#include
|