libDwm-0.9.45
Dwm::Executor Class Reference

Provides a simple interface to fork() + execvp(). More...

#include <DwmExecutor.hh>

Static Public Member Functions

static pid_t Execute (const std::string &commandString)
 Executes the given commandString, which may contain arguments.
 
static pid_t Execute (const std::string &command, char *const argv[])
 Executes the given command with arguments argv.
 
static pid_t Execute (char *const argv[])
 Executes the command with arguments that are combined in argv.
 

Static Public Attributes

static const int k_COMMAND = 260
 Constant for the lexer.
 
static const int k_ARGUMENT = 261
 Constant for the lexer.
 
static const int k_WHITESPACE = 262
 Constant for the lexer.
 

Detailed Description

Provides a simple interface to fork() + execvp().

I wanted a call that looked like system() in usage, but didn't block for the exit of the child and returned a PID. This call is Execute(const std::string &).

Member Function Documentation

◆ Execute() [1/3]

static pid_t Dwm::Executor::Execute ( char *const argv[])
static

Executes the command with arguments that are combined in argv.

Returns the process ID.

◆ Execute() [2/3]

static pid_t Dwm::Executor::Execute ( const std::string & command,
char *const argv[] )
static

Executes the given command with arguments argv.

Returns the process ID.

◆ Execute() [3/3]

static pid_t Dwm::Executor::Execute ( const std::string & commandString)
static

Executes the given commandString, which may contain arguments.

Returns the process ID.


The documentation for this class was generated from the following file: