summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-05-25 21:01:32 +0200
committerAnatol Belski <ab@php.net>2017-05-25 21:04:56 +0200
commite5c273dc0ea4cb0e0583af9b4c5889a8c431264f (patch)
tree5b746ce1f6663a8993a698c4d803198b4fb3bc77 /sapi/cli/php_cli.c
parentd32288b5bf78ad684b73479633a0bc0209a3de35 (diff)
downloadphp-git-e5c273dc0ea4cb0e0583af9b4c5889a8c431264f.tar.gz
Turn interactive mode on, if cli binary is clicked in filemanager
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 0de93d80da..ed66a8f940 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -674,7 +674,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL;
char *arg_free=NULL, **arg_excp=&arg_free;
char *script_file=NULL, *translated_path = NULL;
+#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE) && (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
+ DWORD pl[1];
+ int interactive = GetConsoleProcessList(pl, 1) == 1;
+#else
int interactive=0;
+#endif
int lineno = 0;
const char *param_error=NULL;
int hide_argv = 0;