Logo ROOT   6.08/07
Reference Guide
List of all members | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
XrdProofdAux Class Reference

Definition at line 247 of file XrdProofdAux.h.

Public Member Functions

 XrdProofdAux ()
 

Static Public Member Functions

static const char * AdminMsgType (int type)
 Translates the admin message type in a human readable string. More...
 
static int AssertBaseDir (const char *path, XrdProofUI ui)
 Make sure that the base dir of 'path' is either owned by 'ui' or gives full permissions to 'ui'. More...
 
static int AssertDir (const char *path, XrdProofUI ui, bool changeown)
 Make sure that 'path' exists and is owned by the entity described by 'ui'. More...
 
static int ChangeMod (const char *path, unsigned int mode)
 Change the permission mode of 'path' to 'mode'. More...
 
static int ChangeOwn (const char *path, XrdProofUI ui)
 Change the ownership of 'path' to the entity described by 'ui'. More...
 
static int ChangeToDir (const char *dir, XrdProofUI ui, bool changeown)
 Change current directory to 'dir'. More...
 
static int CheckIf (XrdOucStream *s, const char *h)
 Check existence and match condition of an 'if' directive If none (valid) is found, return -1. More...
 
static char * Expand (char *p)
 Expand path 'p' relative to: $HOME if begins with ~/ <user>'s $HOME if begins with ~<user>/ $PWD if does not begin with '/' or '~' getenv(<ENVVAR>) if it begins with $<ENVVAR>) The returned array of chars is the result of reallocation of the input one. More...
 
static void Expand (XrdOucString &path)
 Expand path 'p' relative to: $HOME if begins with ~/ <user>'s $HOME if begins with ~<user>/ $PWD if does not begin with '/' or '~' getenv(<ENVVAR>) if it begins with $<ENVVAR>) The input string is updated with the result. More...
 
static void Form (XrdOucString &s, const char *fmt, int ns, const char *ss[5], int ni, int ii[6], int np, void *pp[5], int nu=0, unsigned int ui=0)
 Recreate the string according to 'fmt', the up to 5 'const char *', up to 6 'int' arguments, up to 5 'void *' and up to 1 unsigned integer. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1=0, const char *s2=0, const char *s3=0, const char *s4=0)
 Recreate the string according to 'fmt' and the 5 'const char *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1=0, int i2=0, int i3=0, int i4=0, int i5=0)
 Recreate the string according to 'fmt' and the 5 'int' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, void *p0, void *p1=0, void *p2=0, void *p3=0, void *p4=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, const char *s0, const char *s1=0, const char *s2=0, const char *s3=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, int i0, int i1=0, int i2=0, int i3=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, int i0, int i1, unsigned int u1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1, int i0, int i1, int i2)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, const char *s0, const char *s1, const char *s2)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1, const char *s2, int i0, int i1=0, const char *s3=0, const char *s4=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, int i0, int i1, const char *s1, const char *s2, const char *s3)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1, const char *s2, int i0, unsigned int u1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, int i2, const char *s0, const char *s1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1, const char *s2, const char *s3, int i1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, int i2, int i3, const char *s0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, void *p0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, int i2, void *p0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, int i2, int i3, void *p0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, int i1, void *p0, int i2, int i3=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, void *p0, int i0, int i1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, void *p0, int i0, int i1)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, void *p0, const char *s0, int i0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, const char *s0, const char *s1, void *p0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, const char *s0, const char *s1, int i1, int i2=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static void Form (XrdOucString &s, const char *fmt, int i0, const char *s0, int i1, int i2=0)
 Recreate the string according to 'fmt' and the 5 'void *' arguments. More...
 
static int GetGroupInfo (const char *grp, XrdProofGI &gi)
 Get information about group with 'gid' in a thread safe way. More...
 
static int GetGroupInfo (int gid, XrdProofGI &gi)
 Get information about group with 'gid' in a thread safe way. More...
 
static int GetIDFromPath (const char *path, XrdOucString &emsg)
 Extract an integer from a file. More...
 
static long int GetLong (char *str)
 Extract first integer from string at 'str', if any. More...
 
static int GetNumCPUs ()
 Find out and return the number of CPUs in the local machine. More...
 
static int GetProcesses (const char *pn, std::map< int, XrdOucString > *plist)
 Get from the process table list of PIDs for processes named "proofserv' For {linux, sun, macosx} it uses the system info; for other systems it invokes the command shell 'ps ax' via popen. More...
 
static int GetUserInfo (const char *usr, XrdProofUI &ui)
 Get information about user 'usr' in a thread safe way. More...
 
static int GetUserInfo (int uid, XrdProofUI &ui)
 Get information about user with 'uid' in a thread safe way. More...
 
static bool HasToken (const char *s, const char *tokens)
 Returns true is 's' contains at least one of the comma-separated tokens in 'tokens'. More...
 
static int KillProcess (int pid, bool forcekill, XrdProofUI ui, bool changeown)
 Kill the process 'pid'. More...
 
static void LogEmsgToFile (const char *flog, const char *emsg, const char *pfx=0)
 Logs error message 'emsg' to file 'flog' using standard technology. More...
 
static int MvDir (const char *oldpath, const char *newpath)
 Move content of directory at oldpath to newpath. More...
 
static int ParsePidPath (const char *path, XrdOucString &before, XrdOucString &after)
 Parse a path in the form of "<before>[.<pid>][.<after>]", filling 'rest' and returning 'pid'. More...
 
static int ParseUsrGrp (const char *path, XrdOucString &usr, XrdOucString &grp)
 Parse a path in the form of "<usr>[.<grp>][.<pid>]", filling 'usr' and 'grp'. More...
 
static const char * ProofRequestTypes (int type)
 Translates the proof request type in a human readable string. More...
 
static int ReadMsg (int fd, XrdOucString &msg)
 Receive 'msg' from pipe fd. More...
 
static int RmDir (const char *path)
 Remove directory at path and its content. More...
 
static int SymLink (const char *path, const char *link)
 Create a symlink 'link' to 'path' Return 0 in case of success, -1 in case of error. More...
 
static int Touch (const char *path, int opt=0)
 Set access (opt == 1), modify (opt =2 ) or access&modify (opt = 0, default) times of path to current time. More...
 
static int VerifyProcessByID (int pid, const char *pname="proofserv")
 Check if a process named 'pname' and process 'pid' is still in the process table. More...
 
static int Write (int fd, const void *buf, size_t nb)
 Write nb bytes at buf to descriptor 'fd' ignoring interrupts Return the number of bytes written or -1 in case of error. More...
 

Static Private Attributes

static XrdSysRecMutex fgFormMutex
 

#include <XrdProofdAux.h>

Constructor & Destructor Documentation

◆ XrdProofdAux()

XrdProofdAux::XrdProofdAux ( )
inline

Definition at line 250 of file XrdProofdAux.h.

Member Function Documentation

◆ AdminMsgType()

const char * XrdProofdAux::AdminMsgType ( int  type)
static

Translates the admin message type in a human readable string.

Must be consistent with the values in XProofProtocol.h

Definition at line 49 of file XrdProofdAux.cxx.

◆ AssertBaseDir()

int XrdProofdAux::AssertBaseDir ( const char *  path,
XrdProofUI  ui 
)
static

Make sure that the base dir of 'path' is either owned by 'ui' or gives full permissions to 'ui'.

If 'path' is a directory, go through the paths inside it recursively. Return 0 in case of success, -1 in case of error

Definition at line 467 of file XrdProofdAux.cxx.

◆ AssertDir()

int XrdProofdAux::AssertDir ( const char *  path,
XrdProofUI  ui,
bool  changeown 
)
static

Make sure that 'path' exists and is owned by the entity described by 'ui'.

If changeown is TRUE it tries to acquire the privileges before. Return 0 in case of success, -1 in case of error

Definition at line 430 of file XrdProofdAux.cxx.

◆ ChangeMod()

int XrdProofdAux::ChangeMod ( const char *  path,
unsigned int  mode 
)
static

Change the permission mode of 'path' to 'mode'.

If 'path' is a directory, go through the paths inside it recursively. Return 0 in case of success, -1 in case of error

Definition at line 568 of file XrdProofdAux.cxx.

◆ ChangeOwn()

int XrdProofdAux::ChangeOwn ( const char *  path,
XrdProofUI  ui 
)
static

Change the ownership of 'path' to the entity described by 'ui'.

If 'path' is a directory, go through the paths inside it recursively. Return 0 in case of success, -1 in case of error

Definition at line 511 of file XrdProofdAux.cxx.

◆ ChangeToDir()

int XrdProofdAux::ChangeToDir ( const char *  dir,
XrdProofUI  ui,
bool  changeown 
)
static

Change current directory to 'dir'.

If changeown is TRUE it tries to acquire the privileges before. Return 0 in case of success, -1 in case of error

Definition at line 657 of file XrdProofdAux.cxx.

◆ CheckIf()

int XrdProofdAux::CheckIf ( XrdOucStream *  s,
const char *  host 
)
static

Check existence and match condition of an 'if' directive If none (valid) is found, return -1.

Else, return number of chars matching.

Definition at line 725 of file XrdProofdAux.cxx.

◆ Expand() [1/2]

char * XrdProofdAux::Expand ( char *  p)
static

Expand path 'p' relative to: $HOME if begins with ~/ <user>'s $HOME if begins with ~<user>/ $PWD if does not begin with '/' or '~' getenv(<ENVVAR>) if it begins with $<ENVVAR>) The returned array of chars is the result of reallocation of the input one.

If something is inconsistent, for example <ENVVAR> does not exists, the original string is untouched

Definition at line 97 of file XrdProofdAux.cxx.

◆ Expand() [2/2]

void XrdProofdAux::Expand ( XrdOucString &  p)
static

Expand path 'p' relative to: $HOME if begins with ~/ <user>'s $HOME if begins with ~<user>/ $PWD if does not begin with '/' or '~' getenv(<ENVVAR>) if it begins with $<ENVVAR>) The input string is updated with the result.

If something is inconsistent, for example <ENVVAR> does not exists, the original string is untouched

Definition at line 191 of file XrdProofdAux.cxx.

◆ Form() [1/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  ns,
const char *  ss[5],
int  ni,
int  ii[6],
int  np,
void pp[5],
int  nu = 0,
unsigned int  ui = 0 
)
static

Recreate the string according to 'fmt', the up to 5 'const char *', up to 6 'int' arguments, up to 5 'void *' and up to 1 unsigned integer.

Definition at line 2263 of file XrdProofdAux.cxx.

◆ Form() [2/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1 = 0,
const char *  s2 = 0,
const char *  s3 = 0,
const char *  s4 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'const char *' arguments.

Definition at line 2319 of file XrdProofdAux.cxx.

◆ Form() [3/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1 = 0,
int  i2 = 0,
int  i3 = 0,
int  i4 = 0,
int  i5 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'int' arguments.

Definition at line 2333 of file XrdProofdAux.cxx.

◆ Form() [4/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
void p0,
void p1 = 0,
void p2 = 0,
void p3 = 0,
void p4 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2346 of file XrdProofdAux.cxx.

◆ Form() [5/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
const char *  s0,
const char *  s1 = 0,
const char *  s2 = 0,
const char *  s3 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2360 of file XrdProofdAux.cxx.

◆ Form() [6/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
int  i0,
int  i1 = 0,
int  i2 = 0,
int  i3 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2373 of file XrdProofdAux.cxx.

◆ Form() [7/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
int  i0,
int  i1,
unsigned int  u1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2386 of file XrdProofdAux.cxx.

◆ Form() [8/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1,
int  i0,
int  i1,
int  i2 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2399 of file XrdProofdAux.cxx.

◆ Form() [9/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
const char *  s0,
const char *  s1,
const char *  s2 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2412 of file XrdProofdAux.cxx.

◆ Form() [10/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1,
const char *  s2,
int  i0,
int  i1 = 0,
const char *  s3 = 0,
const char *  s4 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2426 of file XrdProofdAux.cxx.

◆ Form() [11/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
int  i0,
int  i1,
const char *  s1,
const char *  s2,
const char *  s3 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2441 of file XrdProofdAux.cxx.

◆ Form() [12/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1,
const char *  s2,
int  i0,
unsigned int  u1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2455 of file XrdProofdAux.cxx.

◆ Form() [13/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
int  i2,
const char *  s0,
const char *  s1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2469 of file XrdProofdAux.cxx.

◆ Form() [14/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1,
const char *  s2,
const char *  s3,
int  i1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2483 of file XrdProofdAux.cxx.

◆ Form() [15/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
int  i2,
int  i3,
const char *  s0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2496 of file XrdProofdAux.cxx.

◆ Form() [16/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
void p0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2509 of file XrdProofdAux.cxx.

◆ Form() [17/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
int  i2,
void p0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2521 of file XrdProofdAux.cxx.

◆ Form() [18/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
int  i2,
int  i3,
void p0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2534 of file XrdProofdAux.cxx.

◆ Form() [19/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
int  i1,
void p0,
int  i2,
int  i3 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2547 of file XrdProofdAux.cxx.

◆ Form() [20/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
void p0,
int  i0,
int  i1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2560 of file XrdProofdAux.cxx.

◆ Form() [21/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
void p0,
int  i0,
int  i1 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2572 of file XrdProofdAux.cxx.

◆ Form() [22/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
void p0,
const char *  s0,
int  i0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2585 of file XrdProofdAux.cxx.

◆ Form() [23/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
const char *  s0,
const char *  s1,
void p0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2598 of file XrdProofdAux.cxx.

◆ Form() [24/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
const char *  s0,
const char *  s1,
int  i1,
int  i2 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2611 of file XrdProofdAux.cxx.

◆ Form() [25/25]

void XrdProofdAux::Form ( XrdOucString &  s,
const char *  fmt,
int  i0,
const char *  s0,
int  i1,
int  i2 = 0 
)
static

Recreate the string according to 'fmt' and the 5 'void *' arguments.

Definition at line 2624 of file XrdProofdAux.cxx.

◆ GetGroupInfo() [1/2]

int XrdProofdAux::GetGroupInfo ( const char *  grp,
XrdProofGI gi 
)
static

Get information about group with 'gid' in a thread safe way.

Retur 0 on success, -errno on error

Definition at line 225 of file XrdProofdAux.cxx.

◆ GetGroupInfo() [2/2]

int XrdProofdAux::GetGroupInfo ( int  gid,
XrdProofGI gi 
)
static

Get information about group with 'gid' in a thread safe way.

Retur 0 on success, -errno on error

Definition at line 259 of file XrdProofdAux.cxx.

◆ GetIDFromPath()

int XrdProofdAux::GetIDFromPath ( const char *  path,
XrdOucString &  emsg 
)
static

Extract an integer from a file.

Definition at line 1110 of file XrdProofdAux.cxx.

◆ GetLong()

long int XrdProofdAux::GetLong ( char *  str)
static

Extract first integer from string at 'str', if any.

Definition at line 202 of file XrdProofdAux.cxx.

◆ GetNumCPUs()

int XrdProofdAux::GetNumCPUs ( )
static

Find out and return the number of CPUs in the local machine.

Return -1 in case of failure.

Definition at line 760 of file XrdProofdAux.cxx.

◆ GetProcesses()

int XrdProofdAux::GetProcesses ( const char *  pn,
std::map< int, XrdOucString > *  pmap 
)
static

Get from the process table list of PIDs for processes named "proofserv' For {linux, sun, macosx} it uses the system info; for other systems it invokes the command shell 'ps ax' via popen.

Return the number of processes found, or -1 if some error occured.

Definition at line 921 of file XrdProofdAux.cxx.

◆ GetUserInfo() [1/2]

int XrdProofdAux::GetUserInfo ( const char *  usr,
XrdProofUI ui 
)
static

Get information about user 'usr' in a thread safe way.

Return 0 on success, -errno on error

Definition at line 293 of file XrdProofdAux.cxx.

◆ GetUserInfo() [2/2]

int XrdProofdAux::GetUserInfo ( int  uid,
XrdProofUI ui 
)
static

Get information about user with 'uid' in a thread safe way.

Retur 0 on success, -errno on error

Definition at line 329 of file XrdProofdAux.cxx.

◆ HasToken()

bool XrdProofdAux::HasToken ( const char *  s,
const char *  tokens 
)
static

Returns true is 's' contains at least one of the comma-separated tokens in 'tokens'.

Else returns false.

Definition at line 1135 of file XrdProofdAux.cxx.

◆ KillProcess()

int XrdProofdAux::KillProcess ( int  pid,
bool  forcekill,
XrdProofUI  ui,
bool  changeown 
)
static

Kill the process 'pid'.

A SIGTERM is sent, unless 'kill' is TRUE, in which case a SIGKILL is used. If add is TRUE (default) the pid is added to the list of processes requested to terminate. Return 0 on success, -1 if not allowed or other errors occured.

Definition at line 1293 of file XrdProofdAux.cxx.

◆ LogEmsgToFile()

void XrdProofdAux::LogEmsgToFile ( const char *  flog,
const char *  emsg,
const char *  pfx = 0 
)
static

Logs error message 'emsg' to file 'flog' using standard technology.

Definition at line 394 of file XrdProofdAux.cxx.

◆ MvDir()

int XrdProofdAux::MvDir ( const char *  oldpath,
const char *  newpath 
)
static

Move content of directory at oldpath to newpath.

The destination path 'newpath' must exist. Returns 0 on success, -errno of the last error on failure

Definition at line 1409 of file XrdProofdAux.cxx.

◆ ParsePidPath()

int XrdProofdAux::ParsePidPath ( const char *  path,
XrdOucString &  before,
XrdOucString &  after 
)
static

Parse a path in the form of "<before>[.<pid>][.<after>]", filling 'rest' and returning 'pid'.

Return 0 if pid is not defined; 'before' is filled with the string preceding <pid>, <after> with the string following <pid>.

Definition at line 1563 of file XrdProofdAux.cxx.

◆ ParseUsrGrp()

int XrdProofdAux::ParseUsrGrp ( const char *  path,
XrdOucString &  usr,
XrdOucString &  grp 
)
static

Parse a path in the form of "<usr>[.<grp>][.<pid>]", filling 'usr' and 'grp'.

Returns -1 on failure, 0 if the pid is not defined or the pid.

Definition at line 1614 of file XrdProofdAux.cxx.

◆ ProofRequestTypes()

const char * XrdProofdAux::ProofRequestTypes ( int  type)
static

Translates the proof request type in a human readable string.

Must be consistent with the values in XProofProtocol.h. The reserved ones are for un

Definition at line 70 of file XrdProofdAux.cxx.

◆ ReadMsg()

int XrdProofdAux::ReadMsg ( int  fd,
XrdOucString &  msg 
)
static

Receive 'msg' from pipe fd.

Definition at line 1516 of file XrdProofdAux.cxx.

◆ RmDir()

int XrdProofdAux::RmDir ( const char *  path)
static

Remove directory at path and its content.

Returns 0 on success, -errno of the last error on failure

Definition at line 1346 of file XrdProofdAux.cxx.

◆ SymLink()

int XrdProofdAux::SymLink ( const char *  path,
const char *  link 
)
static

Create a symlink 'link' to 'path' Return 0 in case of success, -1 in case of error.

Definition at line 695 of file XrdProofdAux.cxx.

◆ Touch()

int XrdProofdAux::Touch ( const char *  path,
int  opt = 0 
)
static

Set access (opt == 1), modify (opt =2 ) or access&modify (opt = 0, default) times of path to current time.

Returns 0 on success, -errno on failure

Definition at line 1486 of file XrdProofdAux.cxx.

◆ VerifyProcessByID()

int XrdProofdAux::VerifyProcessByID ( int  pid,
const char *  pname = "proofserv" 
)
static

Check if a process named 'pname' and process 'pid' is still in the process table.

For {linux, sun, macosx} it uses the system info; for other systems it invokes the command shell 'ps ax' via popen. Return 1 if running, 0 if not running, -1 if the check could not be run.

Definition at line 1153 of file XrdProofdAux.cxx.

◆ Write()

int XrdProofdAux::Write ( int  fd,
const void buf,
size_t  nb 
)
static

Write nb bytes at buf to descriptor 'fd' ignoring interrupts Return the number of bytes written or -1 in case of error.

Definition at line 365 of file XrdProofdAux.cxx.

Member Data Documentation

◆ fgFormMutex

XrdSysRecMutex XrdProofdAux::fgFormMutex
staticprivate

Definition at line 248 of file XrdProofdAux.h.


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