问题
I am writing an application which must spawn and detach a new process which has a separate console window which can be used for user input and output. Ideally the solution should be cross platform and a solution which uses Boost is even better (since Boost is already used extensively within this project).
I have already tried boost::process::spawn
but that only launches the new process in the same console window as the the main process. CreateProcess
(in the Win-API) with the CREATE_NEW_CONSOLE
flag works as a temporary fix, but a cross platform solution is desired.
来源:https://stackoverflow.com/questions/57072843/is-there-a-way-to-create-a-new-console-window-for-process-spawned-with-boost