smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
Functions | Variables
popen_as_ugid.cpp File Reference
#include "popen_as_ugid.h"
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
Include dependency graph for popen_as_ugid.cpp:

Go to the source code of this file.

Functions

FILE * popen_as_ugid (const char *cmd, const char *mode, uid_t uid, gid_t gid)
 
int pclose_as_ugid (FILE *f)
 
const char * parse_ugid (const char *s, uid_t &uid, gid_t &gid, std::string &uname, std::string &gname)
 

Variables

const char * popen_as_ugid_cvsid
 
static FILE * s_popen_file
 
static pid_t s_popen_pid
 

Function Documentation

◆ parse_ugid()

const char * parse_ugid ( const char *  s,
uid_t &  uid,
gid_t &  gid,
std::string &  uname,
std::string &  gname 
)

Definition at line 166 of file popen_as_ugid.cpp.

◆ pclose_as_ugid()

int pclose_as_ugid ( FILE *  f)

Definition at line 145 of file popen_as_ugid.cpp.

◆ popen_as_ugid()

FILE * popen_as_ugid ( const char *  cmd,
const char *  mode,
uid_t  uid,
gid_t  gid 
)

Definition at line 28 of file popen_as_ugid.cpp.

Variable Documentation

◆ popen_as_ugid_cvsid

const char* popen_as_ugid_cvsid
Initial value:
= "$Id: popen_as_ugid.cpp 5579 2024-01-12 18:43:41Z chrfranke $"
#define POPEN_AS_UGID_H_CVSID
Definition: popen_as_ugid.h:12

Definition at line 13 of file popen_as_ugid.cpp.

◆ s_popen_file

FILE* s_popen_file
static

Definition at line 25 of file popen_as_ugid.cpp.

◆ s_popen_pid

pid_t s_popen_pid
static

Definition at line 26 of file popen_as_ugid.cpp.