Prevent window from being created by python ct2ctml subprocess
When using Cantera from a GUI app, the python process was inheriting window settings from the parent, and launching in a window that didn't accept input from the calling process, causing the conversion to fail.
This commit is contained in:
parent
22bdb58f33
commit
8799001ee3
1 changed files with 3 additions and 1 deletions
|
|
@ -166,9 +166,11 @@ void exec_stream_t::start( std::string const & program, std::string const & argu
|
|||
STARTUPINFO si;
|
||||
ZeroMemory( &si, sizeof( si ) );
|
||||
si.cb=sizeof( si );
|
||||
si.wShowWindow = SW_HIDE;
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
PROCESS_INFORMATION pi;
|
||||
ZeroMemory( &pi, sizeof( pi ) );
|
||||
if( !CreateProcess( 0, const_cast< char * >( command.c_str() ), 0, 0, TRUE, 0, 0, 0, &si, &pi ) ) {
|
||||
if( !CreateProcess( 0, const_cast< char * >( command.c_str() ), 0, 0, TRUE, DETACHED_PROCESS, 0, 0, &si, &pi ) ) {
|
||||
throw os_error_t( "exec_stream_t::start: CreateProcess failed.\n command line was: "+command );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue