StrokeSeg 1.0.0
Loading...
Searching...
No Matches
executors.h File Reference

Header file for the executors module. This file contains declarations for functions related to launching child processes in the parent console or in the background. More...

#include "deps.h"
Include dependency graph for executors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool execWithConsole (const std::wstring &commandLine, const std::wstring &selfDirPath, int consoleStatus=0)
 Launches a child process in the parent console.
bool execWitoutConsole (const std::wstring &commandLine, const std::wstring &selfDirPath)
 Launches a child process in the background.

Detailed Description

Header file for the executors module. This file contains declarations for functions related to launching child processes in the parent console or in the background.

Author
Florent LERAY
Date
2023-10-01
Version
1.0

Definition in file executors.h.

Function Documentation

◆ execWithConsole()

bool execWithConsole ( const std::wstring & commandLine,
const std::wstring & selfDirPath,
int consoleStatus = 0 )

Launches a child process in the parent console.

This function creates a child process that inherits the console of the parent process.

Parameters
commandLineThe command line to execute.
selfDirPathThe directory path of the current executable.
consoleStatusThe status of the console (1 for inherit console from parent, 0 for new fresh console, -1 for no console available).
Returns
True if the process was launched successfully, false otherwise.

Definition at line 3 of file executors.cpp.

◆ execWitoutConsole()

bool execWitoutConsole ( const std::wstring & commandLine,
const std::wstring & selfDirPath )

Launches a child process in the background.

This function creates a child process that runs in the background without inheriting the console of the parent process.

Parameters
commandLineThe command line to execute.
selfDirPathThe directory path of the current executable.
Returns
True if the process was launched successfully, false otherwise.

Definition at line 72 of file executors.cpp.