Why does cli_set_process_title sometimes change the wrong process' title?
| From: | tutiluren at tutanota dot com | Date: | Sun, 12 Apr 2020 09:29:55 +0000 |
| Subject: | Why does cli_set_process_title sometimes change the wrong process' title? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-31469@lists.php.net to get a copy of this message | ||
I currently only run PHP on Windows, so I have no idea if the same thing happens on the other
platforms.
I frequently call cli_set_process_title() in my CLI PHP scripts to set the "process
title". Normally, there are no problems at all.
However, on at least two separate occasions, the last time yesterday, something very strange
happened at some unknown point: one of the cli_set_process_title() calls changed the process title
of a completely different process/window: the PHP built-in webserver one!
I start both the built-in PHP webserver and my own PHP CLI scripts with .bat files. My CLI PHP
scripts end up in the cmd.exe group in the Taskbar.
How can this be technically and logically possible? Is it a known issue? Is it known why and when
this happens? I have no idea how I'd reproduce it since it rarely does this, but once it has
done so, the process/window in question keeps its title forever, until I close it and restart it.
(Which of course spawns a new process.)
This really frustrates me, because it's such a weird bug/glitch.