const ProcessID getPid() const
Retrieve Process Identifier of the program.
Result terminate() const
Terminate the program.
The <sys/stat.h> header shall define the stat structure.
ApplicationLauncher(const char *path, const char **argv)
Constructor.
const String m_path
Absolute path to the program to run.
C int errno
The lvalue errno is used by many functions to return error values.
const char ** m_argv
Array with pointers to program arguments.
#define WEXITSTATUS(st)
Returns the exit status of the child process.
u32 ProcessID
Process Identification Number.
Result wait()
Wait for the program to terminate.
#define DEBUG(msg)
Output a debug message to standard output.
#define SIGTERM
Termination request.
char * strerror(int errnum)
The strerror function maps the number in errnum to a message string.
#define NULL
NULL means zero.
Result exec()
Runs the external program.
ProcessID m_pid
PID of the DatastoreServer.
int forkexec(const char *path, const char *argv[])
Create a new process and execute program.
const int getExitCode() const
Retrieve exit code of the program.
#define ESRCH
No such process.
int stat(const char *path, struct stat *buf)
Get file status.
ProcessID pid_t
Used for process IDs and process group IDs.
#define ERROR(msg)
Output an error message.
C int kill(pid_t pid, int sig)
Send a signal to a process or a group of processes.
pid_t waitpid(pid_t pid, int *stat_loc, int options)
Wait for a child process to stop or terminate.
int m_exitCode
Exit code after the program has terminated.
C void exit(int status)
Terminate a process.