Go to the documentation of this file.
40 const char *av[] = {
"/bin/sh", script,
ZERO };
43 NOTICE(
"Starting init script: " << script);
48 ERROR(
"failed to execute /bin/sh: " <<
const char * get(const char *name) const
Get argument by name.
C int errno
The lvalue errno is used by many functions to return error values.
#define NOTICE(msg)
Output a notice message.
POSIX-compatible application.
const ArgumentContainer & arguments() const
Get program arguments.
void setDescription(const String &desc)
Set program description.
virtual ~Init()
Destructor.
int runProgram(const char *path, const char **argv)
Runs an external program.
char * strerror(int errnum)
The strerror function maps the number in errnum to a message string.
Result registerFlag(char arg, const char *name, const char *description)
Register a flag Argument.
Init(int argc, char **argv)
Constructor.
virtual Result exec()
Execute the application.
ArgumentParser & parser()
Get program arguments parser.
#define ERROR(msg)
Output an error message.
pid_t waitpid(pid_t pid, int *stat_loc, int options)
Wait for a child process to stop or terminate.