Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.53k stars 572 forks source link

Python script not waiting for subprocess when opened in the new console window #2419

Open lodhart opened 2 years ago

lodhart commented 2 years ago

Versions

ConEmu build: 210912 x32 OS version: Windows 11 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd

Problem description

When running the Python script (Python 3.9.4):

p = subprocess.Popen(_make_clean, creationflags = subprocess.CREATE_NEW_CONSOLE)
p.wait()

p = subprocess.Popen(_make_rebuild, creationflags = subprocess.CREATE_NEW_CONSOLE)
p.wait()

The script shall open a new console window for each new subprocess and it shall wait until the subprocess is finished before starting the new one. Unfortunately, when running over ConEmu the main python script is NOT waiting until the subprocess finished! Running over native Windows CMD is fully ok. Without the flag 'CREATE_NEW_CONSOLE' it is running ok with ConEmu but output from each subprocess is part of one console output ... I need to have it separately.