Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-18 Thread Alain Williams
On Wed, Sep 18, 2013 at 04:33:50PM +0200, Julien Pauli wrote: > One could use ltrace -l to trace library calls. > > On my laptop (Debian) : > > ltrace -l /usr/lib/x86_64-linux-gnu/libedit.so.2 php -a > > using_history(1, 38, 0x25000f, 712, 0x1087900) = 0 > Interactive s

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-18 Thread Julien Pauli
On Wed, Sep 18, 2013 at 4:20 PM, Alain Williams wrote: > On Wed, Sep 18, 2013 at 04:13:39PM +0200, Remi Collet wrote: > > Le 18/09/2013 16:04, Alain Williams a écrit : > > > > > What is needed is for this to NOT be called if the standard output is > not > > > connected to a tty. > > > > From your

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-18 Thread Alain Williams
On Wed, Sep 18, 2013 at 04:13:39PM +0200, Remi Collet wrote: > Le 18/09/2013 16:04, Alain Williams a écrit : > > > What is needed is for this to NOT be called if the standard output is not > > connected to a tty. > > From your previous message: > > > ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-18 Thread Remi Collet
Le 18/09/2013 16:04, Alain Williams a écrit : > What is needed is for this to NOT be called if the standard output is not > connected to a tty. >From your previous message: > ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo > ...}) = 0 > ioctl(0, SNDCTL_TMR_STOP or

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-18 Thread Alain Williams
On Tue, Sep 17, 2013 at 08:28:58AM +0200, Remi Collet wrote: > > Please... don't rely, for distro packaged PHP on configure option listed > in phpinfo report [1]. > > > Additional Modules > > > > Module Name > > readline > > readline extension doesn't use readline library (under inc

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Remi Collet
Le 17/09/2013 02:27, Alain Williams a écrit : > I have done a bit of digging and suspect that this happens as part of > readline initialisation. +1 > phpinfo() reports: --without-readline but then: Please... don't rely, for distro packaged PHP on configure option listed in phpinfo report [1].

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Michael Wallner
On 17 September 2013 02:27, Alain Williams wrote: > > I have done a bit of digging and suspect that this happens as part of > readline initialisation. That might very well be it. -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.ne

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Michael Wallner
On 16 September 2013 22:17, Edward Z. Yang wrote: > I've seen something similar on Debian; it might be a patch that > your distro is shipping on top of PHP. Nope, I reviewed the Debian PHP patches the other day. -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsub

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Alain Williams
On Mon, Sep 16, 2013 at 10:01:37PM +0200, Martin Jansen wrote: > 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 >

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Martin Jansen
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 a

Re: [PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-16 Thread Edward Z. Yang
I've seen something similar on Debian; it might be a patch that your distro is shipping on top of PHP. Edward Excerpts from Alain Williams's message of Sat Sep 14 04:45:41 -0700 2013: > Hi, > > I am running a PHP script at the command line and piping the output through > less: > > ./myScri

[PHP-DEV] PHP CLI setting cooked terminal mode

2013-09-14 Thread Alain Williams
Hi, I am running a PHP script at the command line and piping the output through less: ./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 t