FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_subprocess Namespace Reference

Child process management and execution. More...

Namespaces

namespace  ns_pipe
 Inter-process pipe management.
 
namespace  stream
 Custom stream redirection for child process stdio.
 

Classes

struct  ArgsCallbackChild
 Arguments passed to child callback. More...
 
struct  ArgsCallbackParent
 Arguments passed to parent callback. More...
 
class  Child
 Handle to a spawned child process. More...
 
class  Subprocess
 

Enumerations

enum class  Stream { Inherit , Pipe , Null }
 Stream redirection modes for child process stdio. More...
 

Functions

std::unique_ptr< const char *[]> to_carray (std::vector< std::string > const &vec)
 Converts a vector of strings to a null-terminated C-style array for execve.
 

Detailed Description

Child process management and execution.

Provides comprehensive subprocess spawning and management with configurable stdio redirection (Pipe/Null/Inherit), environment variable injection, death signal configuration (PR_SET_PDEATHSIG), daemon mode, and log file integration. Supports both synchronous and asynchronous process execution with proper cleanup.

Enumeration Type Documentation

◆ Stream

enum class ns_subprocess::Stream
strong

Stream redirection modes for child process stdio.

Definition at line 49 of file subprocess.hpp.

Function Documentation

◆ to_carray()

std::unique_ptr< const char *[]> ns_subprocess::to_carray ( std::vector< std::string > const & vec)
inline

Converts a vector of strings to a null-terminated C-style array for execve.

Parameters
vecVector of strings to convert
Returns
std::unique_ptr<const char*[]> Null-terminated array of C-strings

Definition at line 100 of file subprocess.hpp.