summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_cmd.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-07-20 21:57:00 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-07-20 21:57:00 +0200
commitf0b50963e5e526e81bd488d94152c81a6033dfaa (patch)
treed8a934b2d090a98ffd222f9d7303d1244f2eab40 /sapi/phpdbg/phpdbg_cmd.c
parent6aadeba213305a0b8818c347bea956cb7e258c3a (diff)
downloadphp-git-f0b50963e5e526e81bd488d94152c81a6033dfaa.tar.gz
Do not use readline when not having a tty
This is important for e.g. run-tests.php
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r--sapi/phpdbg/phpdbg_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index 97be41d561..e28e3a9693 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -716,7 +716,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
#if USE_LIB_STAR
- if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE)
+ if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDOUT].fd))
#endif
{
phpdbg_write("prompt", "", "%s", phpdbg_get_prompt());