On 14.09.13 13:45, Alain Williams wrote: > ./myScript | less > > Since less is an interactive program it puts the terminal into 'raw' mode so > that it can read characters one at a time. However, when I do the above I find > that the commands that I type to less are echoed back to me and not acted on > until I type <RETURN>. This is not as it should be. > > If I run the script under strace I see: > > ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo > ...}) = 0 > ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) > = 0 > > What is happening is that PHP is putting the terminal into cooked mode.
Are you sure it is PHP that's doing this? There are basically no calls to ioctl() (or tcsetattr() for that matter) outside of ext/ at all. - Martin -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php