SUBPROCESS_RUN run process

with optional cwd, env. vars, stdin, timeout

handles command lines with spaces input each segment of the command as an element in a string array this is how python subprocess.run works

Contents

Inputs

Outputs

Example

subprocess_run('mpiexec -help2'); subprocess_run('sh -c "ls -l"'); subprocess_run('cmd /c "dir /Q /L"');

NOTE: if cwd option used, any paths must be absolute, or they are relative to pwd.

Gfortran streams

https://www.mathworks.com/matlabcentral/answers/91919-why-does-the-output-of-my-fortran-script-not-show-up-in-the-matlab-command-window-when-i-execute-it#answer_101270 Matlab grabs the stdout, stderr, stdin handles of a Gfortran program, even when it's using Java. We must disable this behavior for the duration the running process.