I run the shell and I run the following command:
START "" /B php test.php>nul 2>&1
For the purposes of this publication, test.php consists of 1 line: file_put_contents ("test", "test");
You expect it to instantly create a file called test, but that is not the case. Instead, when I enter a command and press enter, nothing happens. However, in the same command window, if I press the enter key again, the script will run.
I tried the equivalent command with node, python2 and python3. They all do the same thing, although python3 just requires 2 keystrokes before running the script.
This seems like a quirk when starting START / B with script interpreters. If I started START / B using .exe or .bat, then it will work as expected.
Now, obviously, I don’t need to start a background process that creates a file called "test". What I need is to start the daemon process written in php and the daemon process written in nodejs, one after another in the same terminal.
I also noticed that if I write these commands to a batch file and run them by double-clicking the batch file, instead of calling it from the shell, then everything will run as expected.
Please, help. I struggled with this problem for 2 days.
EDIT:
I just found that this problem is unique to my computer running Windows 10. I tried on Windows 7 and Windows XP and they did not require additional return inputs from me to run the script ...
. .
, / Windows 10?
, , ?
2:
script Windows 8, , Windows 10. SO : Windows 8 Windows 10 ... .
FFFFFFFFFnnngggghhrrr... -, .
gif , :

, script .