I am using boost.process
to run an external process with some given input. user can specify that external process. So most of the time user specifies a shell script or batch script.
I am simply doing boost::process::launch(_script, arguments, context);
which works both real executables as well as shell scripts as long as they are executable (+x) as expected. but when I run it in windows. it doesn't work If I pass a batch file in _script
however it works if I specify a real executable.
This makes me think that in Windows batch scripts are NOT executables at all ? They are just interpreted through cmd.exe ! is this true ?
I can launch cmd.exe
and specify /c _script argv
as command line parameters. but that will not be cross platform.
and I don't want to make system()
calls because I'll not have full control on created processes ?