com php-src: Fix Bug #65714 PHP cli forces the tty to cooked mode: ext/readline/readline.c
| From: | Remi Collet | Date: | Fri, 15 Nov 2013 08:49:42 +0000 |
| Subject: | com php-src: Fix Bug #65714 PHP cli forces the tty to cooked mode: ext/readline/readline.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73955@lists.php.net to get a copy of this message | ||
Commit: b8d88bf2c588dcaec185468da8db306cd7e6ab8d
Author: Remi Collet <remi@php.net> Fri, 15 Nov 2013 09:49:42 +0100
Parents: d7441f66959b8bee0a059b057e45bd48643153ab
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b8d88bf2c588dcaec185468da8db306cd7e6ab8d
Log:
Fix Bug #65714 PHP cli forces the tty to cooked mode
Only drop the using_history() call with libedit as I don't know
if it is required with readline.
This also allow to run a php script in background without
it being aborted on first output.
Bugs:
https://bugs.php.net/65714
Changed paths:
M ext/readline/readline.c
Diff:
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index bd46069..d4032ca 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -170,7 +170,10 @@ ZEND_GET_MODULE(readline)
PHP_MINIT_FUNCTION(readline)
{
- using_history();
+#if HAVE_LIBREADLINE
+ /* libedit don't need this call which set the tty in cooked mode */
+ using_history();
+#endif
return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU);
}