Hi steffen,
> > An strace(1) shows read(2)s of one byte consuming the first line,
> > including the LF. ioctl(2)s and signal handling are then done. The
> > next read of stdin sees Ctrl-D, the terminal's EOF character, and no
> > more reads are attempted.
The ioctl are
ioctl(0, TCSETSF, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCSETSF, {B38400 opost isig -icanon -echo ...}) = 0
and I think TCSETSF is the same as tcsetattr(0, TCSAFLUSH, ...) and that
"discard pending input" -- tty_ioctl(4). Note sure why the EOF follows,
but it's a clue.
Cheers, Ralph.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
__________________________________
[email protected]