MiKTeX 23.10-next
A scalable TeX distribution
|
An instance of this class manages a child process. More...
#include <miktex/Core/Process.h>
Public Member Functions | |
virtual FILE * | get_StandardInput ()=0 |
virtual FILE * | get_StandardOutput ()=0 |
virtual FILE * | get_StandardError ()=0 |
virtual void | WaitForExit ()=0 |
Waits for the process to finish. More... | |
virtual bool | WaitForExit (int milliseconds)=0 |
virtual ProcessExitStatus | get_ExitStatus () const =0 |
virtual int | get_ExitCode () const =0 |
virtual bool | get_Exception (MiKTeX::Core::MiKTeXException &ex) const =0 |
virtual void | Close ()=0 |
Frees all resources associated with this Process object. More... | |
virtual int | GetSystemId ()=0 |
virtual std::unique_ptr< Process > | get_Parent ()=0 |
virtual std::string | get_ProcessName ()=0 |
virtual ProcessInfo | GetProcessInfo ()=0 |
Static Public Member Functions | |
static std::unique_ptr< Process > | GetCurrentProcess () |
static std::unique_ptr< Process > | GetProcess (int systemId) |
static std::vector< std::string > | GetInvokerNames () |
static std::unique_ptr< Process > | StartSystemCommand (const std::string &commandLine, FILE **ppFileStandardInput, FILE **ppFileStandardOutput) |
static void | StartSystemCommand (const std::string &commandLine) |
static bool | ExecuteSystemCommand (const std::string &commandLine) |
static bool | ExecuteSystemCommand (const std::string &commandLine, int *exitCode) |
static bool | ExecuteSystemCommand (const std::string &commandLine, int *exitCode, IRunProcessCallback *callback, const char *workingDirectory) |
static void | Run (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments) |
static void | Run (const MiKTeX::Util::PathName &fileName) |
static void | Run (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments, IRunProcessCallback *callback) |
static bool | Run (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments, IRunProcessCallback *callback, int *exitCode, MiKTeXException *miktexException, const char *workingDirectory) |
static bool | Run (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments, std::function< bool(const void *, std::size_t)> callback, int *exitCode, MiKTeXException *miktexException, const char *workingDirectory) |
static bool | Run (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments, IRunProcessCallback *callback, int *exitCode, const char *workingDirectory) |
static std::unique_ptr< Process > | Start (const ProcessStartInfo &startinfo) |
static void | Start (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments, FILE *pFileStandardInput, FILE **ppFileStandardInput, FILE **ppFileStandardOutput, FILE **ppFileStandardError, const char *workingDirectory) |
static void | Start (const MiKTeX::Util::PathName &fileName) |
static void | Start (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments) |
static void | Overlay (const MiKTeX::Util::PathName &fileName, const std::vector< std::string > &arguments) |
An instance of this class manages a child process.
|
pure virtual |
Frees all resources associated with this Process
object.
|
static |
Runs the system shell to execute a command.
commandLine | The command (and arguments) to be executed. |
|
static |
Runs the system shell to execute a command.
commandLine | The command (and arguments) to be executed. | |
[out] | exitCode | The exit code of the command. |
true
, if the process exited successfully, or if exitCode
isn't nullptr
.
|
static |
Runs the system shell to execute a command.
commandLine | The command (and arguments) to be executed. | |
[out] | exitCode | The exit code of the command. |
callback | The pointer to a callback interface. | |
workingDirectory | Working directory for the command. |
true
, if the process exited successfully, or if exitCode
isn't nullptr
.
|
pure virtual |
Gets the MiKTeX exception thrown by the process.
[out] | ex | The MiKTeX exception. |
|
pure virtual |
Gets the exit code of the process.
|
pure virtual |
Gets the exit status of the process.
|
pure virtual |
Gets the parent process of this process.
|
pure virtual |
Gets the name of this process.
|
pure virtual |
Gets the redirected stderr
.
FILE
object. Returns nullptr
, if the error output was not redirected.
|
pure virtual |
Gets the redirected stdin
.
FILE
object. Returns nullptr
, if the input was not redirected.
|
pure virtual |
Gets the redirected stdout
.
FILE
object. Returns nullptr
, if the output was not redirected.
|
static |
Gets the current process.
|
static |
Gets the invoker chain for this process.
|
static |
Gets a process.
systemId | Identifies the process. |
|
pure virtual |
Gets information about this process.
|
pure virtual |
Gets the operating system identification of this process.
|
inlinestatic |
Executes a process.
fileName | The name of an executable file to run in the process. |
|
static |
Executes a process.
fileName | The name of an executable file to run in the process. |
arguments | The command-line arguments to pass when starting the process. |
|
static |
Executes a process.
fileName | The name of an executable file to run in the process. |
arguments | The command-line arguments to pass when starting the process. |
callback | Pointer to a callback interface. |
|
inlinestatic |
Executes a process.
fileName | The name of an executable file to run in the process. | |
arguments | The command-line arguments to pass when starting the process. | |
callback | The pointer to a callback interface. | |
[out] | exitCode | The exit code of the process. |
workingDirectory | Working directory for the command. |
true
, if the process exited successfully, or if exitCode
isn't nullptr
.
|
static |
Executes a process.
fileName | The name of an executable file to run in the process. | |
arguments | The command-line arguments to pass when starting the process. | |
callback | The pointer to a callback interface. | |
[out] | exitCode | The exit code of the process. |
[out] | miktexException | The MiKTeX exception thrown by the process. |
workingDirectory | Working directory for the command. |
true
, if the process exited successfully, or if exitCode
isn't nullptr
.
|
static |
Executes a process.
fileName | The name of an executable file to run in the process. | |
arguments | The command-line arguments to pass when starting the process. | |
callback | The pointer to a callback interface. | |
[out] | exitCode | The exit code of the process. |
[out] | miktexException | The MiKTeX exception thrown by the process. |
workingDirectory | Working directory for the command. |
true
, if the process exited successfully, or if exitCode
isn't nullptr
.
|
inlinestatic |
Starts a process.
fileName | The name of an executable file to run in the process. |
|
inlinestatic |
Starts a process.
fileName | The name of an executable file to run in the process. |
arguments | The command-line arguments to pass when starting the process. |
|
static |
Starts a process.
fileName | The name of an executable file to run in the process. | |
arguments | The command-line arguments to pass when starting the process. | |
pFileStandardInput | Optional pointer to the input FILE stream for stdin redirection. | |
[out] | ppFileStandardInput | An optional pointer to the input FILE stream for stdin redirection. |
[out] | ppFileStandardOutput | An optional pointer to the output FILE for stdout redirection. |
[out] | ppFileStandardError | An optional pointer to the error output FILE for stderr redirection. |
workingDirectory | Optional working directory for the command. |
|
static |
Starts a process.
startInfo | The process start options. |
|
inlinestatic |
Starts the system shell to execute a command.
commandLine | The command (and arguments) to be executed. |
|
static |
Starts the system shell to execute a command.
commandLine | The command (and arguments) to be executed. |
|
pure virtual |
Waits for the process to finish.
|
pure virtual |
Waits for the process to finish.
milliseconds | The maximum time to wait. |
true
, if the process has finished.