System
[Utilities]


Files

file  channel.hh
file  pipe.hh
file  pty.hh
file  system.hh

Classes

class  paludis::Channel
class  paludis::Pipe
class  paludis::PtyError
class  paludis::Pty
class  paludis::GetenvError
class  paludis::RunCommandError
class  paludis::Command

Functions

std::string paludis::getenv_with_default (const std::string &key, const std::string &def) PALUDIS_VISIBLE
std::string paludis::getenv_or_error (const std::string &key) PALUDIS_VISIBLE
std::string paludis::kernel_version () PALUDIS_VISIBLE
int paludis::run_command (const Command &cmd) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result))
void paludis::become_command (const Command &cmd) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((noreturn))
void paludis::set_run_command_stdout_fds (const int, const int) PALUDIS_VISIBLE
void paludis::set_run_command_stderr_fds (const int, const int) PALUDIS_VISIBLE
std::string paludis::get_user_name (const uid_t) PALUDIS_VISIBLE
std::string paludis::get_group_name (const gid_t) PALUDIS_VISIBLE

Detailed Description

Various utilities for interacting with lower-level system things.

Examples


Function Documentation

void paludis::become_command ( const Command &  cmd  ) 

Become another command.

Actions that change the initial state (uid / gid, env) work, as do input streams, but output redirection does not. Pipe commands don't work, but could be made to.

Since:
0.40.1

std::string paludis::get_group_name ( const   gid_t  ) 

Fetch the group name for a gid, or the gid as a string if not available.

std::string paludis::get_user_name ( const   uid_t  ) 

Fetch the username for a uid, or the uid as a string if not available.

std::string paludis::getenv_or_error ( const std::string &  key  ) 

Fetch the value of environment variable key, or throw a GetenvError if the variable is not defined.

std::string paludis::getenv_with_default ( const std::string &  key,
const std::string &  def 
)

Fetch the value of environment variable key, or def if the variable is not defined.

std::string paludis::kernel_version (  ) 

Fetch the kernel version, for $KV.

int paludis::run_command ( const Command &  cmd  ) 

Run a command, wait for it to terminate and return its exit status.

void paludis::set_run_command_stderr_fds ( const   int,
const   int 
)

Set the stderr and close for stderr fds used by run_command and run_command_in_directory.

void paludis::set_run_command_stdout_fds ( const   int,
const   int 
)

Set the stderr and close for stdout fds used by run_command and run_command_in_directory.


Generated on Mon Sep 21 10:36:09 2009 for paludis by  doxygen 1.5.4