Logo ROOT  
Reference Guide
TUnixSystem Class Reference

Definition at line 31 of file TUnixSystem.h.

Public Member Functions

 TUnixSystem ()
 
virtual ~TUnixSystem ()
 Reset to original state. More...
 
void Abort (int code=0) override
 Abort the application. More...
 
int AcceptConnection (int sock) override
 Accept a connection. More...
 
Bool_t AccessPathName (const char *path, EAccessMode mode=kFileExists) override
 Returns FALSE if one can access a file using the specified access mode. More...
 
void AddDynamicPath (const char *lib) override
 Add a new directory to the dynamic path. More...
 
void AddFileHandler (TFileHandler *fh) override
 Add a file handler to the list of system file handlers. More...
 
void AddSignalHandler (TSignalHandler *sh) override
 Add a signal handler to list of system signal handlers. More...
 
void AddTimer (TTimer *ti) override
 Add timer to list of system timers. More...
 
int AnnounceTcpService (int port, Bool_t reuse, int backlog, int tcpwindowsize=-1) override
 Announce TCP/IP service. More...
 
int AnnounceUdpService (int port, int backlog) override
 Announce UDP service. More...
 
int AnnounceUnixService (const char *sockpath, int backlog) override
 Announce unix domain service on path 'sockpath'. More...
 
int AnnounceUnixService (int port, int backlog) override
 Announce unix domain service on path "kServerPath/<port>". More...
 
Bool_t ChangeDirectory (const char *path) override
 Change directory. Returns kTRUE in case of success, kFALSE otherwise. More...
 
void CheckChilds ()
 Check if children have finished. More...
 
Bool_t CheckDescriptors ()
 Check if there is activity on some file descriptors and call their Notify() member. More...
 
Bool_t CheckSignals (Bool_t sync)
 Check if some signals were raised and call their Notify() member. More...
 
int Chmod (const char *file, UInt_t mode) override
 Set the file permission bits. Returns -1 in case or error, 0 otherwise. More...
 
void CloseConnection (int sock, Bool_t force=kFALSE) override
 Close socket. More...
 
void Closelog () override
 Close connection to system log daemon. More...
 
int ClosePipe (FILE *pipe) override
 Close the pipe. More...
 
int ConnectService (const char *server, int port, int tcpwindowsize, const char *protocol="tcp")
 Connect to service servicename on server servername. More...
 
int CopyFile (const char *from, const char *to, Bool_t overwrite=kFALSE) override
 Copy a file. More...
 
void DispatchOneEvent (Bool_t pendingOnly=kFALSE) override
 Dispatch a single event. More...
 
void DispatchSignals (ESignals sig)
 Handle and dispatch signals. More...
 
Bool_t DispatchTimers (Bool_t mode)
 Handle and dispatch timers. More...
 
Func_t DynFindSymbol (const char *module, const char *entry) override
 dynamic linking of module More...
 
Int_t Exec (const char *shellcmd) override
 Execute a command. More...
 
void Exit (int code, Bool_t mode=kTRUE) override
 Exit the application. More...
 
char * ExpandPathName (const char *path) override
 Expand a pathname getting rid of special shell characaters like ~. More...
 
Bool_t ExpandPathName (TString &patbuf) override
 Expand a pathname getting rid of special shell characters like ~. More...
 
const char * FindDynamicLibrary (TString &lib, Bool_t quiet=kFALSE) override
 Returns the path of a shared library (searches for library in the shared library search path). More...
 
const char * FindFile (const char *search, TString &file, EAccessMode mode=kFileExists) override
 Find location of file "wfil" in a search path. More...
 
void FreeDirectory (void *dirp) override
 Close a Unix file system directory. More...
 
int GetCpuInfo (CpuInfo_t *info, Int_t sampleTime=1000) const override
 Returns cpu load average and load info into the CpuInfo_t structure. More...
 
const char * GetDirEntry (void *dirp) override
 Get next Unix file system directory entry. Returns 0 if no more entries. More...
 
const char * GetDynamicPath () override
 Return the dynamic path (used to find shared libraries). More...
 
Int_t GetEffectiveGid () override
 Returns the effective group id. More...
 
Int_t GetEffectiveUid () override
 Returns the effective user id. More...
 
const char * Getenv (const char *name) override
 Get environment variable. More...
 
const char * GetError () override
 Return system error string. More...
 
Int_t GetFPEMask () override
 Return the bitmap of conditions that trigger a floating point exception. More...
 
int GetFsInfo (const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree) override
 Get info about a file system: id, bsize, bfree, blocks. More...
 
Int_t GetGid (const char *group=nullptr) override
 Returns the group's id. If group = 0, returns current user's group. More...
 
UserGroup_tGetGroupInfo (const char *group=nullptr) override
 Returns all group info in the UserGroup_t structure. More...
 
UserGroup_tGetGroupInfo (Int_t gid) override
 Returns all group info in the UserGroup_t structure. More...
 
std::string GetHomeDirectory (const char *userName=nullptr) const override
 Return the user's home directory. More...
 
TInetAddress GetHostByName (const char *server) override
 Get Internet Protocol (IP) address of host. More...
 
int GetMemInfo (MemInfo_t *info) const override
 Returns ram and swap memory usage info into the MemInfo_t structure. More...
 
int GetPathInfo (const char *path, FileStat_t &buf) override
 Get info about a file. More...
 
TInetAddress GetPeerName (int sock) override
 Get Internet Protocol (IP) address of remote host and port #. More...
 
int GetPid () override
 Get process id. More...
 
int GetProcInfo (ProcInfo_t *info) const override
 Returns cpu and memory used by this process into the ProcInfo_t structure. More...
 
int GetServiceByName (const char *service) override
 Get port # of internet service. More...
 
char * GetServiceByPort (int port) override
 Get name of internet service. More...
 
TInetAddress GetSockName (int sock) override
 Get Internet Protocol (IP) address of host and port #. More...
 
int GetSockOpt (int sock, int option, int *val) override
 Get socket option. More...
 
int GetSysInfo (SysInfo_t *info) const override
 Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t structure. More...
 
Int_t GetUid (const char *user=nullptr) override
 Returns the user's id. If user = 0, returns current user's id. More...
 
UserGroup_tGetUserInfo (const char *user=nullptr) override
 Returns all user info in the UserGroup_t structure. More...
 
UserGroup_tGetUserInfo (Int_t uid) override
 Returns all user info in the UserGroup_t structure. More...
 
std::string GetWorkingDirectory () const override
 Return working directory. More...
 
const char * HomeDirectory (const char *userName=nullptr) override
 Return the user's home directory. More...
 
const char * HostName () override
 Return the system's host name. More...
 
void IgnoreSignal (ESignals sig, Bool_t ignore=kTRUE) override
 If ignore is true ignore the specified signal, else restore previous behaviour. More...
 
Bool_t Init () override
 Initialize Unix system interface. More...
 
Bool_t IsPathLocal (const char *path) override
 Returns TRUE if the url in 'path' points to the local file system. More...
 
int Link (const char *from, const char *to) override
 Create a link from file1 to file2. More...
 
void ListLibraries (const char *regexp="") override
 List all loaded shared libraries. More...
 
void ListSymbols (const char *module, const char *re="") override
 List symbols in a shared library. More...
 
int Load (const char *module, const char *entry="", Bool_t system=kFALSE) override
 Load a shared library. More...
 
int MakeDirectory (const char *name) override
 Make a Unix file system directory. More...
 
TTime Now () override
 Get current time in milliseconds since 0:00 Jan 1 1995. More...
 
int OpenConnection (const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp") override
 Open a connection to a service on a server. More...
 
voidOpenDirectory (const char *name) override
 Open a Unix file system directory. Returns 0 if directory does not exist. More...
 
void Openlog (const char *name, Int_t options, ELogFacility facility) override
 Open connection to system log daemon. More...
 
FILE * OpenPipe (const char *shellcmd, const char *mode) override
 Open a pipe. More...
 
const char * PrependPathName (const char *dir, TString &name) override
 Concatenate a directory and a file name. More...
 
int RecvBuf (int sock, void *buffer, int length) override
 Receive a buffer headed by a length indicator. More...
 
int RecvRaw (int sock, void *buffer, int length, int flag) override
 Receive exactly length bytes into buffer. More...
 
Int_t RedirectOutput (const char *name, const char *mode="a", RedirectHandle_t *h=nullptr) override
 Redirect standard output (stdout, stderr) to the specified file. More...
 
TFileHandlerRemoveFileHandler (TFileHandler *fh) override
 Remove a file handler from the list of file handlers. More...
 
TSignalHandlerRemoveSignalHandler (TSignalHandler *sh) override
 Remove a signal handler from list of signal handlers. More...
 
TTimerRemoveTimer (TTimer *ti) override
 Remove timer from list of system timers. More...
 
int Rename (const char *from, const char *to) override
 Rename a file. Returns 0 when successful, -1 in case of failure. More...
 
void ResetSignal (ESignals sig, Bool_t reset=kTRUE) override
 If reset is true reset the signal handler for the specified signal to the default handler, else restore previous behaviour. More...
 
void ResetSignals () override
 Reset signals handlers to previous behaviour. More...
 
void ResetTimer (TTimer *ti) override
 Reset a-sync timer. More...
 
Int_t Select (TFileHandler *fh, Long_t timeout) override
 Select on the file descriptor related to file handler h. More...
 
Int_t Select (TList *active, Long_t timeout) override
 Select on file descriptors. More...
 
int SendBuf (int sock, const void *buffer, int length) override
 Send a buffer headed by a length indicator. More...
 
int SendRaw (int sock, const void *buffer, int length, int flag) override
 Send exactly length bytes from buffer. More...
 
void SetDisplay () override
 Set DISPLAY environment variable based on utmp entry. Only for UNIX. More...
 
void SetDynamicPath (const char *lib) override
 Set the dynamic path to a new value. More...
 
void Setenv (const char *name, const char *value) override
 Set environment variable. More...
 
Int_t SetFPEMask (Int_t mask=kDefaultMask) override
 Set which conditions trigger a floating point exception. More...
 
void SetProgname (const char *name) override
 Set the application name (from command line, argv[0]) and copy it in gProgName. More...
 
int SetSockOpt (int sock, int option, int val) override
 Set socket option. More...
 
void SigAlarmInterruptsSyscalls (Bool_t set) override
 When the argument is true the SIGALRM signal handler is set so that interrupted syscalls will not be restarted by the kernel. More...
 
void Sleep (UInt_t milliSec) override
 Sleep milliSec milliseconds. More...
 
void StackTrace () override
 Print a stack trace. More...
 
int Symlink (const char *from, const char *to) override
 Create a symlink from file1 to file2. More...
 
void Syslog (ELogLevel level, const char *mess) override
 Send mess to syslog daemon. More...
 
const char * TempDirectory () const override
 Return a user configured or systemwide directory to create temporary files in. More...
 
FILE * TempFileName (TString &base, const char *dir=nullptr) override
 Create a secure temporary file by appending a unique 6 letter string to base. More...
 
int Umask (Int_t mask) override
 Set the process file creation mode mask. More...
 
int Unlink (const char *name) override
 Unlink, i.e. More...
 
void Unload (const char *module) override
 Unload a shared library. More...
 
void Unsetenv (const char *name) override
 Unset environment variable. More...
 
int Utime (const char *file, Long_t modtime, Long_t actime) override
 Set a files modification and access times. More...
 
const char * WorkingDirectory () override
 Return working directory. More...
 
- Public Member Functions inherited from TSystem
 TSystem (const char *name="Generic", const char *title="Generic System")
 Create a new OS interface. More...
 
virtual ~TSystem ()
 Delete the OS interface. More...
 
virtual void Abort (int code=0)
 Abort the application. More...
 
virtual int AcceptConnection (int sock)
 Accept a connection. More...
 
virtual Bool_t AccessPathName (const char *path, EAccessMode mode=kFileExists)
 Returns FALSE if one can access a file using the specified access mode. More...
 
virtual void AddDynamicPath (const char *pathname)
 Add a new directory to the dynamic path. More...
 
virtual void AddFileHandler (TFileHandler *fh)
 Add a file handler to the list of system file handlers. More...
 
virtual void AddIncludePath (const char *includePath)
 Add includePath to the already set include path. More...
 
virtual void AddLinkedLibs (const char *linkedLib)
 Add linkedLib to already set linked libs. More...
 
virtual void AddSignalHandler (TSignalHandler *sh)
 Add a signal handler to list of system signal handlers. More...
 
virtual void AddStdExceptionHandler (TStdExceptionHandler *eh)
 Add an exception handler to list of system exception handlers. More...
 
virtual void AddTimer (TTimer *t)
 Add timer to list of system timers. More...
 
virtual int AnnounceTcpService (int port, Bool_t reuse, int backlog, int tcpwindowsize=-1)
 Announce TCP/IP service. More...
 
virtual int AnnounceUdpService (int port, int backlog)
 Announce UDP service. More...
 
virtual int AnnounceUnixService (const char *sockpath, int backlog)
 Announce unix domain service. More...
 
virtual int AnnounceUnixService (int port, int backlog)
 Announce unix domain service. More...
 
virtual const char * BaseName (const char *pathname)
 Base name of a file name. Base name of /user/root is root. More...
 
void Beep (Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
 Beep for duration milliseconds with a tone of frequency freq. More...
 
Bool_t cd (const char *path)
 
virtual Bool_t ChangeDirectory (const char *path)
 Change directory. More...
 
virtual int Chmod (const char *file, UInt_t mode)
 Set the file permission bits. Returns -1 in case or error, 0 otherwise. More...
 
virtual void CleanCompiledMacros ()
 Remove the shared libs produced by the CompileMacro() function. More...
 
virtual void CloseConnection (int sock, Bool_t force=kFALSE)
 Close socket connection. More...
 
virtual void Closelog ()
 Close connection to system log daemon. More...
 
virtual int ClosePipe (FILE *pipe)
 Close the pipe. More...
 
virtual int CompileMacro (const char *filename, Option_t *opt="", const char *library_name="", const char *build_dir="", UInt_t dirmode=0)
 This method compiles and loads a shared library containing the code from the file "filename". More...
 
virtual char * ConcatFileName (const char *dir, const char *name)
 Concatenate a directory and a file name. User must delete returned string. More...
 
virtual int CopyFile (const char *from, const char *to, Bool_t overwrite=kFALSE)
 Copy a file. More...
 
virtual const char * DirName (const char *pathname)
 Return the directory name in pathname. More...
 
virtual void DispatchOneEvent (Bool_t pendingOnly=kFALSE)
 Dispatch a single event. More...
 
char * DynamicPathName (const char *lib, Bool_t quiet=kFALSE)
 Find a dynamic library called lib using the system search paths. More...
 
virtual Func_t DynFindSymbol (const char *module, const char *entry)
 Find specific entry point in specified library. More...
 
virtual Int_t Exec (const char *shellcmd)
 Execute a command. More...
 
virtual void Exit (int code, Bool_t mode=kTRUE)
 Exit the application. More...
 
virtual void ExitLoop ()
 Exit from event loop. More...
 
virtual char * ExpandPathName (const char *path)
 Expand a pathname getting rid of special shell characters like ~. More...
 
virtual Bool_t ExpandPathName (TString &path)
 Expand a pathname getting rid of special shell characters like ~. More...
 
virtual const char * FindDynamicLibrary (TString &lib, Bool_t quiet=kFALSE)
 Find a dynamic library using the system search paths. More...
 
virtual const char * FindFile (const char *search, TString &file, EAccessMode mode=kFileExists)
 Find location of file in a search path. More...
 
virtual void FreeDirectory (void *dirp)
 Free a directory. More...
 
virtual EAclicMode GetAclicMode () const
 AclicMode indicates whether the library should be built in debug mode or optimized. More...
 
virtual Int_t GetAclicProperties () const
 Return the ACLiC properties field. More...
 
void GetBeepDefaults (Int_t &freq, Int_t &duration) const
 
virtual const char * GetBuildArch () const
 Return the build architecture. More...
 
virtual const char * GetBuildCompiler () const
 Return the build compiler. More...
 
virtual const char * GetBuildCompilerVersion () const
 Return the build compiler version. More...
 
virtual const char * GetBuildDir () const
 Return the path of the build directory. More...
 
virtual const char * GetBuildNode () const
 Return the build node name. More...
 
virtual int GetCpuInfo (CpuInfo_t *info, Int_t sampleTime=1000) const
 Returns cpu load average and load info into the CpuInfo_t structure. More...
 
virtual const char * GetDirEntry (void *dirp)
 Get a directory entry. Returns 0 if no more entries. More...
 
virtual TString GetDirName (const char *pathname)
 Return the directory name in pathname. More...
 
virtual voidGetDirPtr () const
 
virtual const char * GetDynamicPath ()
 Return the dynamic path (used to find shared libraries). More...
 
virtual Int_t GetEffectiveGid ()
 Returns the effective group id. More...
 
virtual Int_t GetEffectiveUid ()
 Returns the effective user id. More...
 
virtual const char * Getenv (const char *env)
 Get environment variable. More...
 
virtual const char * GetError ()
 Return system error string. More...
 
const char * GetErrorStr () const
 
virtual const char * GetFlagsDebug () const
 Return the debug flags. More...
 
virtual const char * GetFlagsOpt () const
 Return the optimization flags. More...
 
virtual Int_t GetFPEMask ()
 Return the bitmap of conditions that trigger a floating point exception. More...
 
virtual TString GetFromPipe (const char *command)
 Execute command and return output in TString. More...
 
virtual int GetFsInfo (const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
 Get info about a file system: fs type, block size, number of blocks, number of free blocks. More...
 
virtual Int_t GetGid (const char *group=nullptr)
 Returns the group's id. If group = 0, returns current user's group. More...
 
virtual UserGroup_tGetGroupInfo (const char *group=nullptr)
 Returns all group info in the UserGroup_t structure. More...
 
virtual UserGroup_tGetGroupInfo (Int_t gid)
 Returns all group info in the UserGroup_t structure. More...
 
virtual std::string GetHomeDirectory (const char *userName=nullptr) const
 Return the user's home directory. More...
 
virtual TInetAddress GetHostByName (const char *server)
 Get Internet Protocol (IP) address of host. More...
 
virtual const char * GetIncludePath ()
 Get the list of include path. More...
 
virtual const char * GetLibraries (const char *regexp="", const char *option="", Bool_t isRegexp=kTRUE)
 Return a space separated list of loaded shared libraries. More...
 
virtual const char * GetLinkdefSuffix () const
 Return the linkdef suffix chosen by the user for ACLiC. More...
 
virtual const char * GetLinkedLibs () const
 Return the list of library linked to this executable. More...
 
virtual TSeqCollectionGetListOfFileHandlers () const
 
virtual TSeqCollectionGetListOfSignalHandlers () const
 
virtual TSeqCollectionGetListOfStdExceptionHandlers () const
 
virtual TSeqCollectionGetListOfTimers () const
 
virtual const char * GetMakeExe () const
 Return the command line use to make an executable. More...
 
virtual const char * GetMakeSharedLib () const
 Return the command line use to make a shared library. More...
 
virtual int GetMemInfo (MemInfo_t *info) const
 Returns ram and swap memory usage info into the MemInfo_t structure. More...
 
virtual const char * GetObjExt () const
 Get the object file extension. More...
 
virtual int GetPathInfo (const char *path, FileStat_t &buf)
 Get info about a file. More...
 
int GetPathInfo (const char *path, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
 Get info about a file: id, size, flags, modification time. More...
 
int GetPathInfo (const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
 Get info about a file: id, size, flags, modification time. More...
 
virtual TInetAddress GetPeerName (int sock)
 Get Internet Protocol (IP) address of remote host and port #. More...
 
virtual int GetPid ()
 Get process id. More...
 
virtual int GetProcInfo (ProcInfo_t *info) const
 Returns cpu and memory used by this process into the ProcInfo_t structure. More...
 
virtual int GetServiceByName (const char *service)
 Get port # of internet service. More...
 
virtual char * GetServiceByPort (int port)
 Get name of internet service. More...
 
virtual TInetAddress GetSockName (int sock)
 Get Internet Protocol (IP) address of host and port #. More...
 
virtual int GetSockOpt (int sock, int kind, int *val)
 Get socket option. More...
 
virtual const char * GetSoExt () const
 Get the shared library extension. More...
 
virtual int GetSysInfo (SysInfo_t *info) const
 Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t structure. More...
 
virtual Int_t GetUid (const char *user=nullptr)
 Returns the user's id. If user = 0, returns current user's id. More...
 
virtual UserGroup_tGetUserInfo (const char *user=nullptr)
 Returns all user info in the UserGroup_t structure. More...
 
virtual UserGroup_tGetUserInfo (Int_t uid)
 Returns all user info in the UserGroup_t structure. More...
 
virtual TListGetVolumes (Option_t *) const
 
virtual std::string GetWorkingDirectory () const
 Return working directory. More...
 
virtual const char * HomeDirectory (const char *userName=nullptr)
 Return the user's home directory. More...
 
virtual const char * HostName ()
 Return the system's host name. More...
 
virtual void IgnoreInterrupt (Bool_t ignore=kTRUE)
 If ignore is true ignore the interrupt signal, else restore previous behaviour. More...
 
virtual void IgnoreSignal (ESignals sig, Bool_t ignore=kTRUE)
 If ignore is true ignore the specified signal, else restore previous behaviour. More...
 
Bool_t InControl () const
 
virtual Bool_t Init ()
 Initialize the OS interface. More...
 
virtual void InnerLoop ()
 Inner event loop. More...
 
virtual Bool_t IsAbsoluteFileName (const char *dir)
 Return true if dir is an absolute pathname. More...
 
virtual Bool_t IsFileInIncludePath (const char *name, char **fullpath=nullptr)
 Return true if 'name' is a file that can be found in the ROOT include path or the current directory. More...
 
virtual Bool_t IsPathLocal (const char *path)
 Returns TRUE if the url in 'path' points to the local file system. More...
 
virtual int Link (const char *from, const char *to)
 Create a link from file1 to file2. More...
 
virtual void ListLibraries (const char *regexp="")
 List all loaded shared libraries. More...
 
virtual void ListSymbols (const char *module, const char *re="")
 List symbols in a shared library. More...
 
virtual int Load (const char *module, const char *entry="", Bool_t system=kFALSE)
 Load a shared library. More...
 
virtual UInt_t LoadAllLibraries ()
 Load all libraries known to ROOT via the rootmap system. More...
 
virtual int MakeDirectory (const char *name)
 Make a directory. More...
 
virtual int mkdir (const char *name, Bool_t recursive=kFALSE)
 Make a file system directory. More...
 
virtual Long_t NextTimeOut (Bool_t mode)
 Time when next timer of mode (synchronous=kTRUE or asynchronous=kFALSE) will time-out (in ms). More...
 
virtual void NotifyApplicationCreated ()
 Hook to tell TSystem that the TApplication object has been created. More...
 
virtual TTime Now ()
 Get current time in milliseconds since 0:00 Jan 1 1995. More...
 
virtual int OpenConnection (const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
 Open a connection to another host. More...
 
virtual voidOpenDirectory (const char *name)
 Open a directory. Returns 0 if directory does not exist. More...
 
virtual void Openlog (const char *name, Int_t options, ELogFacility facility)
 Open connection to system log daemon. More...
 
virtual FILE * OpenPipe (const char *command, const char *mode)
 Open a pipe. More...
 
virtual const char * PrependPathName (const char *dir, TString &name)
 Concatenate a directory and a file name. More...
 
virtual Bool_t ProcessEvents ()
 Process pending events (GUI, timers, sockets). More...
 
const char * pwd ()
 
virtual int RecvBuf (int sock, void *buffer, int length)
 Receive a buffer headed by a length indicator. More...
 
virtual int RecvRaw (int sock, void *buffer, int length, int flag)
 Receive exactly length bytes into buffer. More...
 
virtual Int_t RedirectOutput (const char *name, const char *mode="a", RedirectHandle_t *h=nullptr)
 Redirect standard output (stdout, stderr) to the specified file. More...
 
virtual TFileHandlerRemoveFileHandler (TFileHandler *fh)
 Remove a file handler from the list of file handlers. More...
 
void RemoveOnExit (TObject *obj)
 Objects that should be deleted on exit of the OS interface. More...
 
virtual TSignalHandlerRemoveSignalHandler (TSignalHandler *sh)
 Remove a signal handler from list of signal handlers. More...
 
virtual TStdExceptionHandlerRemoveStdExceptionHandler (TStdExceptionHandler *eh)
 Remove an exception handler from list of exception handlers. More...
 
virtual TTimerRemoveTimer (TTimer *t)
 Remove timer from list of system timers. More...
 
virtual int Rename (const char *from, const char *to)
 Rename a file. More...
 
virtual void ResetSignal (ESignals sig, Bool_t reset=kTRUE)
 If reset is true reset the signal handler for the specified signal to the default handler, else restore previous behaviour. More...
 
virtual void ResetSignals ()
 Reset signals handlers to previous behaviour. More...
 
virtual void ResetTimer (TTimer *)
 
virtual void Run ()
 System event loop. More...
 
virtual Int_t Select (TFileHandler *fh, Long_t timeout)
 Select on active file descriptors (called by TMonitor). More...
 
virtual Int_t Select (TList *active, Long_t timeout)
 Select on active file descriptors (called by TMonitor). More...
 
virtual int SendBuf (int sock, const void *buffer, int length)
 Send a buffer headed by a length indicator. More...
 
virtual int SendRaw (int sock, const void *buffer, int length, int flag)
 Send exactly length bytes from buffer. More...
 
virtual void SetAclicMode (EAclicMode mode)
 AclicMode indicates whether the library should be built in debug mode or optimized. More...
 
virtual void SetBuildDir (const char *build_dir, Bool_t isflat=kFALSE)
 Set the location where ACLiC will create libraries and use as a scratch area. More...
 
virtual void SetDisplay ()
 Set DISPLAY environment variable based on utmp entry. Only for UNIX. More...
 
virtual void SetDynamicPath (const char *pathname)
 Set the dynamic path to a new value. More...
 
virtual void Setenv (const char *name, const char *value)
 Set environment variable. More...
 
void SetErrorStr (const char *errstr)
 Set the system error string. More...
 
virtual void SetFlagsDebug (const char *)
 FlagsDebug should contain the options to pass to the C++ compiler in order to compile the library in debug mode. More...
 
virtual void SetFlagsOpt (const char *)
 FlagsOpt should contain the options to pass to the C++ compiler in order to compile the library in optimized mode. More...
 
virtual Int_t SetFPEMask (Int_t mask=kDefaultMask)
 Set which conditions trigger a floating point exception. More...
 
virtual void SetIncludePath (const char *includePath)
 IncludePath should contain the list of compiler flags to indicate where to find user defined header files. More...
 
virtual void SetLinkdefSuffix (const char *suffix)
 The 'suffix' will be appended to the name of a script loaded by ACLiC and used to locate any eventual additional linkdef information that ACLiC should used to produce the dictionary. More...
 
virtual void SetLinkedLibs (const char *linkedLibs)
 LinkedLibs should contain the library directory and list of libraries needed to recreate the current executable. More...
 
virtual void SetMakeExe (const char *directives)
 Directives has the same syntax as the argument of SetMakeSharedLib but is used to create an executable. More...
 
virtual void SetMakeSharedLib (const char *directives)
 Directives should contain the description on how to compile and link a shared lib. More...
 
virtual void SetObjExt (const char *objExt)
 Set object files extension, should be either .o, .obj, etc. More...
 
virtual void SetProgname (const char *name)
 Set the application name (from command line, argv[0]) and copy it in gProgName. More...
 
virtual int SetSockOpt (int sock, int kind, int val)
 Set socket option. More...
 
virtual void SetSoExt (const char *soExt)
 Set shared library extension, should be either .so, .sl, .a, .dll, etc. More...
 
virtual void ShowOutput (RedirectHandle_t *h)
 Display the content associated with the redirection described by the opaque handle 'h'. More...
 
virtual void Sleep (UInt_t milliSec)
 Sleep milliSec milli seconds. More...
 
virtual TString SplitAclicMode (const char *filename, TString &mode, TString &args, TString &io) const
 This method split a filename of the form: More...
 
virtual void StackTrace ()
 Print a stack trace. More...
 
virtual int Symlink (const char *from, const char *to)
 Create a symbolic link from file1 to file2. More...
 
virtual void Syslog (ELogLevel level, const char *mess)
 Send mess to syslog daemon. More...
 
virtual const char * TempDirectory () const
 Return a user configured or systemwide directory to create temporary files in. More...
 
virtual FILE * TempFileName (TString &base, const char *dir=nullptr)
 Create a secure temporary file by appending a unique 6 letter string to base. More...
 
virtual int Umask (Int_t mask)
 Set the process file creation mode mask. More...
 
virtual const char * UnixPathName (const char *unixpathname)
 Convert from a local pathname to a Unix pathname. More...
 
virtual int Unlink (const char *name)
 Unlink, i.e. More...
 
virtual void Unload (const char *module)
 Unload a shared library. More...
 
virtual void Unsetenv (const char *name)
 Unset environment variable. More...
 
virtual int Utime (const char *file, Long_t modtime, Long_t actime)
 Set the a files modification and access times. More...
 
virtual char * Which (const char *search, const char *file, EAccessMode mode=kFileExists)
 Find location of file in a search path. More...
 
virtual const char * WorkingDirectory ()
 Return working directory. More...
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor. More...
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor. More...
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void Copy (TObject &named) const
 Copy this to obj. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual void Print (Option_t *option="") const
 Print TNamed name and title. More...
 
virtual void SetName (const char *name)
 Set the name of the TNamed. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Set all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Set the title of the TNamed. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Protected Member Functions

const char * GetLinkedLibraries () override
 Get list of shared libraries loaded at the start of the executable. More...
 
- Protected Member Functions inherited from TSystem
virtual Bool_t ConsistentWith (const char *path, void *dirptr=nullptr)
 Check consistency of this helper with the one required by 'path' or 'dirptr'. More...
 
virtual void DoBeep (Int_t=-1, Int_t=-1) const
 
virtual const char * ExpandFileName (const char *fname)
 Expand a pathname getting rid of special shell characters like ~. More...
 
virtual Bool_t ExpandFileName (TString &fname)
 Expand a pathname getting rid of special shell characters like ~. More...
 
TSystemFindHelper (const char *path, void *dirptr=nullptr)
 Create helper TSystem to handle file and directory operations that might be special for remote file access. More...
 
TStringGetLastErrorString ()
 Return the thread local storage for the custom last error message. More...
 
const TStringGetLastErrorString () const
 Return the thread local storage for the custom last error message. More...
 
virtual const char * GetLinkedLibraries ()
 Get list of shared libraries loaded at the start of the executable. More...
 
virtual void SigAlarmInterruptsSyscalls (Bool_t)
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Static Protected Member Functions

static int UnixFilestat (const char *path, FileStat_t &buf)
 Get info about a file. More...
 
static int UnixFSstat (const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
 Get info about a file system: id, bsize, bfree, blocks. More...
 
static const char * UnixGetdirentry (void *dir)
 Returns the next directory entry. More...
 
static const char * UnixHomedirectory (const char *user, char *path, char *mydir)
 Returns the user's home directory. More...
 
static const char * UnixHomedirectory (const char *user=nullptr)
 Returns the user's home directory. More...
 
static void UnixIgnoreSignal (ESignals sig, Bool_t ignore)
 If ignore is true ignore the specified signal, else restore previous behaviour. More...
 
static int UnixMakedir (const char *name)
 Make a Unix file system directory. More...
 
static Long64_t UnixNow ()
 Get current time in milliseconds since 0:00 Jan 1 1995. More...
 
static voidUnixOpendir (const char *name)
 Open a directory. More...
 
static int UnixRecv (int sock, void *buf, int len, int flag)
 Receive exactly length bytes into buffer. More...
 
static void UnixResetSignal (ESignals sig)
 Restore old signal handler for specified signal. More...
 
static void UnixResetSignals ()
 Restore old signal handlers. More...
 
static int UnixSelect (Int_t nfds, TFdSet *readready, TFdSet *writeready, Long_t timeout)
 Wait for events on the file descriptors specified in the readready and writeready masks or for timeout (in milliseconds) to occur. More...
 
static int UnixSend (int sock, const void *buf, int len, int flag)
 Send exactly length bytes from buffer. More...
 
static int UnixSetitimer (Long_t ms)
 Set interval timer to time-out in ms milliseconds. More...
 
static void UnixSigAlarmInterruptsSyscalls (Bool_t set)
 When the argument is true the SIGALRM signal handler is set so that interrupted syscalls will not be restarted by the kernel. More...
 
static void UnixSignal (ESignals sig, SigHandler_t h)
 Set a signal handler for a signal. More...
 
static const char * UnixSigname (ESignals sig)
 Return the signal name associated with a signal. More...
 
static int UnixTcpConnect (const char *hostname, int port, int tcpwindowsize)
 Open a TCP/IP connection to server and connect to a service (i.e. More...
 
static int UnixTcpService (int port, Bool_t reuse, int backlog, int tcpwindowsize)
 Open a socket, bind to it and start listening for TCP/IP connections on the port. More...
 
static int UnixUdpConnect (const char *hostname, int port)
 Creates a UDP socket connection Is called via the TSocket constructor. More...
 
static int UnixUdpService (int port, int backlog)
 Open a socket, bind to it and start listening for UDP connections on the port. More...
 
static int UnixUnixConnect (const char *path)
 Connect to a Unix domain socket. Returns -1 in case of error. More...
 
static int UnixUnixConnect (int port)
 Connect to a Unix domain socket. More...
 
static int UnixUnixService (const char *sockpath, int backlog)
 Open a socket on path 'sockpath', bind to it and start listening for Unix domain connections to it. More...
 
static int UnixUnixService (int port, int backlog)
 Open a socket, bind to it and start listening for Unix domain connections to it. More...
 
static int UnixWaitchild ()
 Wait till child is finished. More...
 
- Static Protected Member Functions inherited from TSystem
static const char * StripOffProto (const char *path, const char *proto)
 Strip off protocol string from specified path. More...
 

Private Member Functions

void FillWithCwd (char *cwd) const
 Fill buffer with current working directory. More...
 

Additional Inherited Members

- Public Types inherited from TSystem
enum  EAclicMode { kDefault , kDebug , kOpt }
 
enum  EAclicProperties { kFlatBuildDir = BIT(0) }
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from TSystem
static Int_t GetErrno ()
 Static function returning system error number. More...
 
static void ResetErrno ()
 Static function resetting system error number. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 
- Protected Attributes inherited from TSystem
EAclicMode fAclicMode {kDefault}
 
Int_t fAclicProperties {0}
 
Int_t fBeepDuration {0}
 
Int_t fBeepFreq {0}
 
TString fBuildArch
 
TString fBuildCompiler
 
TString fBuildCompilerVersion
 
TString fBuildDir
 
TString fBuildNode
 
TSeqCollectionfCompiled {nullptr}
 
Bool_t fDone {kFALSE}
 
TSeqCollectionfFileHandler {nullptr}
 
TString fFlagsDebug
 
TString fFlagsOpt
 
TSeqCollectionfHelpers {nullptr}
 
TString fHostname
 
TString fIncludePath
 
Bool_t fInControl {kFALSE}
 
Bool_t fInsideNotify {kFALSE}
 
Int_t fLevel {0}
 
TString fLinkdefSuffix
 
TString fLinkedLibs
 
TString fListLibs
 
TString fListPaths
 
TString fMakeExe
 
TString fMakeSharedLib
 
Int_t fMaxrfd {-1}
 
Int_t fMaxwfd {-1}
 
Int_t fNfd {0}
 Signals that were trapped. More...
 
TString fObjExt
 
TSeqCollectionfOnExitList {nullptr}
 
TFdSet * fReadmask {nullptr}
 
TFdSet * fReadready {nullptr}
 Files that should be checked for write events. More...
 
Int_t fSigcnt {0}
 
TSeqCollectionfSignalHandler {nullptr}
 
TFdSet * fSignals {nullptr}
 Files with writes waiting. More...
 
TString fSoExt
 
TSeqCollectionfStdExceptionHandler {nullptr}
 
TSeqCollectionfTimers {nullptr}
 
TString fWdpath
 
TFdSet * fWritemask {nullptr}
 Files that should be checked for read events. More...
 
TFdSet * fWriteready {nullptr}
 Files with reads waiting. More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

#include <TUnixSystem.h>

Inheritance diagram for TUnixSystem:
[legend]

Constructor & Destructor Documentation

◆ TUnixSystem()

TUnixSystem::TUnixSystem ( )

Definition at line 560 of file TUnixSystem.cxx.

◆ ~TUnixSystem()

TUnixSystem::~TUnixSystem ( )
virtual

Reset to original state.

Definition at line 566 of file TUnixSystem.cxx.

Member Function Documentation

◆ Abort()

void TUnixSystem::Abort ( int  code = 0)
overridevirtual

Abort the application.

Reimplemented from TSystem.

Definition at line 2162 of file TUnixSystem.cxx.

◆ AcceptConnection()

int TUnixSystem::AcceptConnection ( int  sock)
overridevirtual

Accept a connection.

In case of an error return -1. In case non-blocking I/O is enabled and no connections are available return -2.

Reimplemented from TSystem.

Definition at line 3248 of file TUnixSystem.cxx.

◆ AccessPathName()

Bool_t TUnixSystem::AccessPathName ( const char *  path,
EAccessMode  mode = kFileExists 
)
overridevirtual

Returns FALSE if one can access a file using the specified access mode.

Mode is the same as for the Unix access(2) function. Attention, bizarre convention of return value!!

Reimplemented from TSystem.

Definition at line 1539 of file TUnixSystem.cxx.

◆ AddDynamicPath()

void TUnixSystem::AddDynamicPath ( const char *  lib)
overridevirtual

Add a new directory to the dynamic path.

Reimplemented from TSystem.

Definition at line 4656 of file TUnixSystem.cxx.

◆ AddFileHandler()

void TUnixSystem::AddFileHandler ( TFileHandler h)
overridevirtual

Add a file handler to the list of system file handlers.

Only adds the handler if it is not already in the list of file handlers.

Reimplemented from TSystem.

Definition at line 747 of file TUnixSystem.cxx.

◆ AddSignalHandler()

void TUnixSystem::AddSignalHandler ( TSignalHandler h)
overridevirtual

Add a signal handler to list of system signal handlers.

Only adds the handler if it is not already in the list of signal handlers.

Reimplemented from TSystem.

Definition at line 802 of file TUnixSystem.cxx.

◆ AddTimer()

void TUnixSystem::AddTimer ( TTimer ti)
overridevirtual

Add timer to list of system timers.

Reimplemented from TSystem.

Definition at line 2969 of file TUnixSystem.cxx.

◆ AnnounceTcpService()

int TUnixSystem::AnnounceTcpService ( int  port,
Bool_t  reuse,
int  backlog,
int  tcpwindowsize = -1 
)
overridevirtual

Announce TCP/IP service.

Open a socket, bind to it and start listening for TCP/IP connections on the port. If reuse is true reuse the address, backlog specifies how many sockets can be waiting to be accepted. Use tcpwindowsize to specify the size of the receive buffer, it has to be specified here to make sure the window scale option is set (for tcpwindowsize > 65KB and for platforms supporting window scaling). Returns socket fd or -1 if socket() failed, -2 if bind() failed or -3 if listen() failed.

Reimplemented from TSystem.

Definition at line 3213 of file TUnixSystem.cxx.

◆ AnnounceUdpService()

int TUnixSystem::AnnounceUdpService ( int  port,
int  backlog 
)
overridevirtual

Announce UDP service.

Reimplemented from TSystem.

Definition at line 3222 of file TUnixSystem.cxx.

◆ AnnounceUnixService() [1/2]

int TUnixSystem::AnnounceUnixService ( const char *  sockpath,
int  backlog 
)
overridevirtual

Announce unix domain service on path 'sockpath'.

Reimplemented from TSystem.

Definition at line 3238 of file TUnixSystem.cxx.

◆ AnnounceUnixService() [2/2]

int TUnixSystem::AnnounceUnixService ( int  port,
int  backlog 
)
overridevirtual

Announce unix domain service on path "kServerPath/<port>".

Reimplemented from TSystem.

Definition at line 3230 of file TUnixSystem.cxx.

◆ ChangeDirectory()

Bool_t TUnixSystem::ChangeDirectory ( const char *  path)
overridevirtual

Change directory. Returns kTRUE in case of success, kFALSE otherwise.

Reimplemented from TSystem.

Definition at line 1399 of file TUnixSystem.cxx.

◆ CheckChilds()

void TUnixSystem::CheckChilds ( )

Check if children have finished.

Definition at line 1282 of file TUnixSystem.cxx.

◆ CheckDescriptors()

Bool_t TUnixSystem::CheckDescriptors ( )

Check if there is activity on some file descriptors and call their Notify() member.

Definition at line 1302 of file TUnixSystem.cxx.

◆ CheckSignals()

Bool_t TUnixSystem::CheckSignals ( Bool_t  sync)

Check if some signals were raised and call their Notify() member.

Definition at line 1251 of file TUnixSystem.cxx.

◆ Chmod()

int TUnixSystem::Chmod ( const char *  file,
UInt_t  mode 
)
overridevirtual

Set the file permission bits. Returns -1 in case or error, 0 otherwise.

Reimplemented from TSystem.

Definition at line 1853 of file TUnixSystem.cxx.

◆ CloseConnection()

void TUnixSystem::CloseConnection ( int  sock,
Bool_t  force = kFALSE 
)
overridevirtual

Close socket.

Reimplemented from TSystem.

Definition at line 3270 of file TUnixSystem.cxx.

◆ Closelog()

void TUnixSystem::Closelog ( )
overridevirtual

Close connection to system log daemon.

Reimplemented from TSystem.

Definition at line 2623 of file TUnixSystem.cxx.

◆ ClosePipe()

int TUnixSystem::ClosePipe ( FILE *  pipe)
overridevirtual

Close the pipe.

Reimplemented from TSystem.

Definition at line 2131 of file TUnixSystem.cxx.

◆ ConnectService()

int TUnixSystem::ConnectService ( const char *  server,
int  port,
int  tcpwindowsize,
const char *  protocol = "tcp" 
)

Connect to service servicename on server servername.

Definition at line 3173 of file TUnixSystem.cxx.

◆ CopyFile()

int TUnixSystem::CopyFile ( const char *  f,
const char *  t,
Bool_t  overwrite = kFALSE 
)
overridevirtual

Copy a file.

If overwrite is true and file already exists the file will be overwritten. Returns 0 when successful, -1 in case of file open failure, -2 in case the file already exists and overwrite was false and -3 in case of error during copy.

Reimplemented from TSystem.

Definition at line 1558 of file TUnixSystem.cxx.

◆ DispatchOneEvent()

void TUnixSystem::DispatchOneEvent ( Bool_t  pendingOnly = kFALSE)
overridevirtual

Dispatch a single event.

Reimplemented from TSystem.

Definition at line 1058 of file TUnixSystem.cxx.

◆ DispatchSignals()

void TUnixSystem::DispatchSignals ( ESignals  sig)

Handle and dispatch signals.

Definition at line 3626 of file TUnixSystem.cxx.

◆ DispatchTimers()

Bool_t TUnixSystem::DispatchTimers ( Bool_t  mode)

Handle and dispatch timers.

If mode = kTRUE dispatch synchronous timers else a-synchronous timers.

Definition at line 2939 of file TUnixSystem.cxx.

◆ DynFindSymbol()

Func_t TUnixSystem::DynFindSymbol ( const char *  module,
const char *  entry 
)
overridevirtual

dynamic linking of module

Reimplemented from TSystem.

Definition at line 2774 of file TUnixSystem.cxx.

◆ Exec()

int TUnixSystem::Exec ( const char *  shellcmd)
overridevirtual

Execute a command.

Reimplemented from TSystem.

Definition at line 2115 of file TUnixSystem.cxx.

◆ Exit()

void TUnixSystem::Exit ( int  code,
Bool_t  mode = kTRUE 
)
overridevirtual

Exit the application.

Reimplemented from TSystem.

Definition at line 2147 of file TUnixSystem.cxx.

◆ ExpandPathName() [1/2]

char * TUnixSystem::ExpandPathName ( const char *  path)
overridevirtual

Expand a pathname getting rid of special shell characaters like ~.

$, etc. For Unix/Win32 compatibility use instead of $XXX when using environment variables in a pathname. If compatibility is not an issue you can use on Unix directly $XXX. The user must delete returned string. Returns the expanded pathname or 0 in case of error. The user must delete returned string (delete []).

Reimplemented from TSystem.

Definition at line 1842 of file TUnixSystem.cxx.

◆ ExpandPathName() [2/2]

Bool_t TUnixSystem::ExpandPathName ( TString path)
overridevirtual

Expand a pathname getting rid of special shell characters like ~.

$, etc. For Unix/Win32 compatibility use instead of $XXX when using environment variables in a pathname. If compatibility is not an issue you can use on Unix directly $XXX. Returns kFALSE in case of success or kTRUE in case of error.

Reimplemented from TSystem.

Definition at line 1709 of file TUnixSystem.cxx.

◆ FillWithCwd()

void TUnixSystem::FillWithCwd ( char *  cwd) const
private

Fill buffer with current working directory.

Definition at line 1438 of file TUnixSystem.cxx.

◆ FindDynamicLibrary()

const char * TUnixSystem::FindDynamicLibrary ( TString sLib,
Bool_t  quiet = kFALSE 
)
overridevirtual

Returns the path of a shared library (searches for library in the shared library search path).

If no file name extension is provided it first tries .so, .sl, .dl and then .a (for AIX).

Reimplemented from TSystem.

Definition at line 4692 of file TUnixSystem.cxx.

◆ FindFile()

const char * TUnixSystem::FindFile ( const char *  search,
TString wfil,
EAccessMode  mode = kFileExists 
)
overridevirtual

Find location of file "wfil" in a search path.

The search path is specified as a : separated list of directories. Return value is pointing to wfile for compatibility with Which(const char*,const char*,EAccessMode) version.

Reimplemented from TSystem.

Definition at line 1887 of file TUnixSystem.cxx.

◆ FreeDirectory()

void TUnixSystem::FreeDirectory ( void dirp)
overridevirtual

Close a Unix file system directory.

Reimplemented from TSystem.

Definition at line 1369 of file TUnixSystem.cxx.

◆ GetCpuInfo()

int TUnixSystem::GetCpuInfo ( CpuInfo_t info,
Int_t  sampleTime = 1000 
) const
overridevirtual

Returns cpu load average and load info into the CpuInfo_t structure.

Returns -1 in case of error, 0 otherwise. Use sampleTime to set the interval over which the CPU load will be measured, in ms (default 1000).

Reimplemented from TSystem.

Definition at line 5213 of file TUnixSystem.cxx.

◆ GetDirEntry()

const char * TUnixSystem::GetDirEntry ( void dirp)
overridevirtual

Get next Unix file system directory entry. Returns 0 if no more entries.

Reimplemented from TSystem.

Definition at line 1384 of file TUnixSystem.cxx.

◆ GetDynamicPath()

const char * TUnixSystem::GetDynamicPath ( )
overridevirtual

Return the dynamic path (used to find shared libraries).

Reimplemented from TSystem.

Definition at line 4669 of file TUnixSystem.cxx.

◆ GetEffectiveGid()

Int_t TUnixSystem::GetEffectiveGid ( )
overridevirtual

Returns the effective group id.

The effective group id corresponds to the set id bit on the file being executed.

Reimplemented from TSystem.

Definition at line 2005 of file TUnixSystem.cxx.

◆ GetEffectiveUid()

Int_t TUnixSystem::GetEffectiveUid ( )
overridevirtual

Returns the effective user id.

The effective id corresponds to the set id bit on the file being executed.

Reimplemented from TSystem.

Definition at line 1981 of file TUnixSystem.cxx.

◆ Getenv()

const char * TUnixSystem::Getenv ( const char *  name)
overridevirtual

Get environment variable.

Reimplemented from TSystem.

Definition at line 2097 of file TUnixSystem.cxx.

◆ GetError()

const char * TUnixSystem::GetError ( )
overridevirtual

Return system error string.

Reimplemented from TSystem.

Definition at line 708 of file TUnixSystem.cxx.

◆ GetFPEMask()

Int_t TUnixSystem::GetFPEMask ( )
overridevirtual

Return the bitmap of conditions that trigger a floating point exception.

Reimplemented from TSystem.

Definition at line 881 of file TUnixSystem.cxx.

◆ GetFsInfo()

int TUnixSystem::GetFsInfo ( const char *  path,
Long_t id,
Long_t bsize,
Long_t blocks,
Long_t bfree 
)
overridevirtual

Get info about a file system: id, bsize, bfree, blocks.

Id is file system type (machine dependend, see statfs()) Bsize is block size of file system Blocks is total number of blocks in file system Bfree is number of free blocks in file system The function returns 0 in case of success and 1 if the file system could not be stat'ed.

Reimplemented from TSystem.

Definition at line 1636 of file TUnixSystem.cxx.

◆ GetGid()

Int_t TUnixSystem::GetGid ( const char *  group = nullptr)
overridevirtual

Returns the group's id. If group = 0, returns current user's group.

Reimplemented from TSystem.

Definition at line 1989 of file TUnixSystem.cxx.

◆ GetGroupInfo() [1/2]

UserGroup_t * TUnixSystem::GetGroupInfo ( const char *  group = nullptr)
overridevirtual

Returns all group info in the UserGroup_t structure.

The only active fields in the UserGroup_t structure for this call are: fGid and fGroup If group = 0, returns current user's group. The returned structure must be deleted by the user. In case of error 0 is returned.

Reimplemented from TSystem.

Definition at line 2079 of file TUnixSystem.cxx.

◆ GetGroupInfo() [2/2]

UserGroup_t * TUnixSystem::GetGroupInfo ( Int_t  gid)
overridevirtual

Returns all group info in the UserGroup_t structure.

The only active fields in the UserGroup_t structure for this call are: fGid and fGroup The returned structure must be deleted by the user. In case of error 0 is returned.

Reimplemented from TSystem.

Definition at line 2059 of file TUnixSystem.cxx.

◆ GetHomeDirectory()

std::string TUnixSystem::GetHomeDirectory ( const char *  userName = nullptr) const
overridevirtual

Return the user's home directory.

Reimplemented from TSystem.

Definition at line 1456 of file TUnixSystem.cxx.

◆ GetHostByName()

TInetAddress TUnixSystem::GetHostByName ( const char *  hostname)
overridevirtual

Get Internet Protocol (IP) address of host.

Returns an TInetAddress object. To see if the hostname lookup was successfull call TInetAddress::IsValid().

Reimplemented from TSystem.

Definition at line 3006 of file TUnixSystem.cxx.

◆ GetLinkedLibraries()

const char * TUnixSystem::GetLinkedLibraries ( )
overrideprotectedvirtual

Get list of shared libraries loaded at the start of the executable.

Returns 0 in case list cannot be obtained or in case of error.

Reimplemented from TSystem.

Definition at line 2817 of file TUnixSystem.cxx.

◆ GetMemInfo()

int TUnixSystem::GetMemInfo ( MemInfo_t info) const
overridevirtual

Returns ram and swap memory usage info into the MemInfo_t structure.

Returns -1 in case of error, 0 otherwise.

Reimplemented from TSystem.

Definition at line 5230 of file TUnixSystem.cxx.

◆ GetPathInfo()

int TUnixSystem::GetPathInfo ( const char *  path,
FileStat_t buf 
)
overridevirtual

Get info about a file.

Info is returned in the form of a FileStat_t structure (see TSystem.h). The function returns 0 in case of success and 1 if the file could not be stat'ed.

Reimplemented from TSystem.

Definition at line 1618 of file TUnixSystem.cxx.

◆ GetPeerName()

TInetAddress TUnixSystem::GetPeerName ( int  sock)
overridevirtual

Get Internet Protocol (IP) address of remote host and port #.

Reimplemented from TSystem.

Definition at line 3107 of file TUnixSystem.cxx.

◆ GetPid()

int TUnixSystem::GetPid ( )
overridevirtual

Get process id.

Reimplemented from TSystem.

Definition at line 2139 of file TUnixSystem.cxx.

◆ GetProcInfo()

int TUnixSystem::GetProcInfo ( ProcInfo_t info) const
overridevirtual

Returns cpu and memory used by this process into the ProcInfo_t structure.

Returns -1 in case of error, 0 otherwise.

Reimplemented from TSystem.

Definition at line 5247 of file TUnixSystem.cxx.

◆ GetServiceByName()

int TUnixSystem::GetServiceByName ( const char *  service)
overridevirtual

Get port # of internet service.

Reimplemented from TSystem.

Definition at line 3143 of file TUnixSystem.cxx.

◆ GetServiceByPort()

char * TUnixSystem::GetServiceByPort ( int  port)
overridevirtual

Get name of internet service.

Reimplemented from TSystem.

Definition at line 3158 of file TUnixSystem.cxx.

◆ GetSockName()

TInetAddress TUnixSystem::GetSockName ( int  sock)
overridevirtual

Get Internet Protocol (IP) address of host and port #.

Reimplemented from TSystem.

Definition at line 3071 of file TUnixSystem.cxx.

◆ GetSockOpt()

int TUnixSystem::GetSockOpt ( int  sock,
int  option,
int val 
)
overridevirtual

Get socket option.

Reimplemented from TSystem.

Definition at line 3479 of file TUnixSystem.cxx.

◆ GetSysInfo()

int TUnixSystem::GetSysInfo ( SysInfo_t info) const
overridevirtual

Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t structure.

Returns -1 in case of error, 0 otherwise.

Reimplemented from TSystem.

Definition at line 5189 of file TUnixSystem.cxx.

◆ GetUid()

Int_t TUnixSystem::GetUid ( const char *  user = nullptr)
overridevirtual

Returns the user's id. If user = 0, returns current user's id.

Reimplemented from TSystem.

Definition at line 1965 of file TUnixSystem.cxx.

◆ GetUserInfo() [1/2]

UserGroup_t * TUnixSystem::GetUserInfo ( const char *  user = nullptr)
overridevirtual

Returns all user info in the UserGroup_t structure.

If user = 0, returns current user's id info. The returned structure must be deleted by the user. In case of error 0 is returned.

Reimplemented from TSystem.

Definition at line 2047 of file TUnixSystem.cxx.

◆ GetUserInfo() [2/2]

UserGroup_t * TUnixSystem::GetUserInfo ( Int_t  uid)
overridevirtual

Returns all user info in the UserGroup_t structure.

The returned structure must be deleted by the user. In case of error 0 is returned.

Reimplemented from TSystem.

Definition at line 2014 of file TUnixSystem.cxx.

◆ GetWorkingDirectory()

std::string TUnixSystem::GetWorkingDirectory ( ) const
overridevirtual

Return working directory.

Reimplemented from TSystem.

Definition at line 1428 of file TUnixSystem.cxx.

◆ HomeDirectory()

const char * TUnixSystem::HomeDirectory ( const char *  userName = nullptr)
overridevirtual

Return the user's home directory.

Reimplemented from TSystem.

Definition at line 1448 of file TUnixSystem.cxx.

◆ HostName()

const char * TUnixSystem::HostName ( )
overridevirtual

Return the system's host name.

Reimplemented from TSystem.

Definition at line 727 of file TUnixSystem.cxx.

◆ IgnoreSignal()

void TUnixSystem::IgnoreSignal ( ESignals  sig,
Bool_t  ignore = kTRUE 
)
overridevirtual

If ignore is true ignore the specified signal, else restore previous behaviour.

Reimplemented from TSystem.

Definition at line 860 of file TUnixSystem.cxx.

◆ Init()

Bool_t TUnixSystem::Init ( )
overridevirtual

Initialize Unix system interface.

Reimplemented from TSystem.

Definition at line 580 of file TUnixSystem.cxx.

◆ IsPathLocal()

Bool_t TUnixSystem::IsPathLocal ( const char *  path)
overridevirtual

Returns TRUE if the url in 'path' points to the local file system.

This is used to avoid going through the NIC card for local operations.

Reimplemented from TSystem.

Definition at line 1603 of file TUnixSystem.cxx.

◆ Link()

int TUnixSystem::Link ( const char *  from,
const char *  to 
)
overridevirtual

Create a link from file1 to file2.

Returns 0 when successful, -1 in case of failure.

Reimplemented from TSystem.

Definition at line 1646 of file TUnixSystem.cxx.

◆ ListLibraries()

void TUnixSystem::ListLibraries ( const char *  regexp = "")
overridevirtual

List all loaded shared libraries.

Reimplemented from TSystem.

Definition at line 2808 of file TUnixSystem.cxx.

◆ ListSymbols()

void TUnixSystem::ListSymbols ( const char *  module,
const char *  re = "" 
)
overridevirtual

List symbols in a shared library.

Reimplemented from TSystem.

Definition at line 2800 of file TUnixSystem.cxx.

◆ Load()

int TUnixSystem::Load ( const char *  module,
const char *  entry = "",
Bool_t  system = kFALSE 
)
overridevirtual

Load a shared library.

Returns 0 on successful loading, 1 in case lib was already loaded and -1 in case lib does not exist or in case of error.

Reimplemented from TSystem.

Definition at line 2784 of file TUnixSystem.cxx.

◆ MakeDirectory()

int TUnixSystem::MakeDirectory ( const char *  name)
overridevirtual

Make a Unix file system directory.

Returns 0 in case of success and -1 if the directory could not be created.

Reimplemented from TSystem.

Definition at line 1345 of file TUnixSystem.cxx.

◆ Now()

TTime TUnixSystem::Now ( )
overridevirtual

Get current time in milliseconds since 0:00 Jan 1 1995.

Reimplemented from TSystem.

Definition at line 2930 of file TUnixSystem.cxx.

◆ OpenConnection()

int TUnixSystem::OpenConnection ( const char *  server,
int  port,
int  tcpwindowsize = -1,
const char *  protocol = "tcp" 
)
overridevirtual

Open a connection to a service on a server.

Returns -1 in case connection cannot be opened. Use tcpwindowsize to specify the size of the receive buffer, it has to be specified here to make sure the window scale option is set (for tcpwindowsize > 65KB and for platforms supporting window scaling). Is called via the TSocket constructor.

Reimplemented from TSystem.

Definition at line 3197 of file TUnixSystem.cxx.

◆ OpenDirectory()

void * TUnixSystem::OpenDirectory ( const char *  name)
overridevirtual

Open a Unix file system directory. Returns 0 if directory does not exist.

Reimplemented from TSystem.

Definition at line 1357 of file TUnixSystem.cxx.

◆ Openlog()

void TUnixSystem::Openlog ( const char *  name,
Int_t  options,
ELogFacility  facility 
)
overridevirtual

Open connection to system log daemon.

For the use of the options and facility see the Unix openlog man page.

Reimplemented from TSystem.

Definition at line 2576 of file TUnixSystem.cxx.

◆ OpenPipe()

FILE * TUnixSystem::OpenPipe ( const char *  shellcmd,
const char *  mode 
)
overridevirtual

Open a pipe.

Reimplemented from TSystem.

Definition at line 2123 of file TUnixSystem.cxx.

◆ PrependPathName()

const char * TUnixSystem::PrependPathName ( const char *  dir,
TString name 
)
overridevirtual

Concatenate a directory and a file name.

Reimplemented from TSystem.

Definition at line 1512 of file TUnixSystem.cxx.

◆ RecvBuf()

int TUnixSystem::RecvBuf ( int  sock,
void buf,
int  length 
)
overridevirtual

Receive a buffer headed by a length indicator.

Length is the size of the buffer. Returns the number of bytes received in buf or -1 in case of error.

Reimplemented from TSystem.

Definition at line 3288 of file TUnixSystem.cxx.

◆ RecvRaw()

int TUnixSystem::RecvRaw ( int  sock,
void buf,
int  length,
int  opt 
)
overridevirtual

Receive exactly length bytes into buffer.

Use opt to receive out-of-band data or to have a peek at what is in the buffer (see TSocket). Buffer must be able to store at least length bytes. Returns the number of bytes received (can be 0 if other side of connection was closed) or -1 in case of error, -2 in case of MSG_OOB and errno == EWOULDBLOCK, -3 in case of MSG_OOB and errno == EINVAL and -4 in case of kNoBlock and errno == EWOULDBLOCK. Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).

Reimplemented from TSystem.

Definition at line 3340 of file TUnixSystem.cxx.

◆ RedirectOutput()

Int_t TUnixSystem::RedirectOutput ( const char *  file,
const char *  mode = "a",
RedirectHandle_t h = nullptr 
)
overridevirtual

Redirect standard output (stdout, stderr) to the specified file.

If the file argument is 0 the output is set again to stderr, stdout. The second argument specifies whether the output should be added to the file ("a", default) or the file be truncated before ("w"). This function saves internally the current state into a static structure. The call can be made reentrant by specifying the opaque structure pointed by 'h', which is filled with the relevant information. The handle 'h' obtained on the first call must then be used in any subsequent call, included ShowOutput, to display the redirected output. Returns 0 on success, -1 in case of error.

Reimplemented from TSystem.

Definition at line 2642 of file TUnixSystem.cxx.

◆ RemoveFileHandler()

TFileHandler * TUnixSystem::RemoveFileHandler ( TFileHandler h)
overridevirtual

Remove a file handler from the list of file handlers.

Returns the handler or 0 if the handler was not in the list of file handlers.

Reimplemented from TSystem.

Definition at line 769 of file TUnixSystem.cxx.

◆ RemoveSignalHandler()

TSignalHandler * TUnixSystem::RemoveSignalHandler ( TSignalHandler h)
overridevirtual

Remove a signal handler from list of signal handlers.

Returns the handler or 0 if the handler was not in the list of signal handlers.

Reimplemented from TSystem.

Definition at line 814 of file TUnixSystem.cxx.

◆ RemoveTimer()

TTimer * TUnixSystem::RemoveTimer ( TTimer ti)
overridevirtual

Remove timer from list of system timers.

Reimplemented from TSystem.

Definition at line 2978 of file TUnixSystem.cxx.

◆ Rename()

int TUnixSystem::Rename ( const char *  from,
const char *  to 
)
overridevirtual

Rename a file. Returns 0 when successful, -1 in case of failure.

Reimplemented from TSystem.

Definition at line 1592 of file TUnixSystem.cxx.

◆ ResetSignal()

void TUnixSystem::ResetSignal ( ESignals  sig,
Bool_t  reset = kTRUE 
)
overridevirtual

If reset is true reset the signal handler for the specified signal to the default handler, else restore previous behaviour.

Reimplemented from TSystem.

Definition at line 840 of file TUnixSystem.cxx.

◆ ResetSignals()

void TUnixSystem::ResetSignals ( )
overridevirtual

Reset signals handlers to previous behaviour.

Reimplemented from TSystem.

Definition at line 851 of file TUnixSystem.cxx.

◆ ResetTimer()

void TUnixSystem::ResetTimer ( TTimer ti)
overridevirtual

Reset a-sync timer.

Reimplemented from TSystem.

Definition at line 2993 of file TUnixSystem.cxx.

◆ Select() [1/2]

Int_t TUnixSystem::Select ( TFileHandler h,
Long_t  to 
)
overridevirtual

Select on the file descriptor related to file handler h.

The timeout to is in millisec. Returns the number of ready descriptors, or 0 in case of timeout, or < 0 in case of an error, with -2 being EINTR and -3 EBADF. In case of EINTR the errno has been reset and the method can be called again. Returns -4 in case the file handler is 0 or does not have a file descriptor >= 0.

Reimplemented from TSystem.

Definition at line 1215 of file TUnixSystem.cxx.

◆ Select() [2/2]

Int_t TUnixSystem::Select ( TList act,
Long_t  to 
)
overridevirtual

Select on file descriptors.

The timeout to is in millisec. Returns the number of ready descriptors, or 0 in case of timeout, or < 0 in case of an error, with -2 being EINTR and -3 EBADF. In case of EINTR the errno has been reset and the method can be called again. Returns -4 in case the list did not contain any file handlers or file handlers with file descriptor >= 0.

Reimplemented from TSystem.

Definition at line 1167 of file TUnixSystem.cxx.

◆ SendBuf()

int TUnixSystem::SendBuf ( int  sock,
const void buf,
int  length 
)
overridevirtual

Send a buffer headed by a length indicator.

Returns length of sent buffer or -1 in case of error.

Reimplemented from TSystem.

Definition at line 3313 of file TUnixSystem.cxx.

◆ SendRaw()

int TUnixSystem::SendRaw ( int  sock,
const void buf,
int  length,
int  opt 
)
overridevirtual

Send exactly length bytes from buffer.

Use opt to send out-of-band data (see TSocket). Returns the number of bytes sent or -1 in case of error. Returns -4 in case of kNoBlock and errno == EWOULDBLOCK. Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).

Reimplemented from TSystem.

Definition at line 3377 of file TUnixSystem.cxx.

◆ SetDisplay()

void TUnixSystem::SetDisplay ( )
overridevirtual

Set DISPLAY environment variable based on utmp entry. Only for UNIX.

Reimplemented from TSystem.

Definition at line 648 of file TUnixSystem.cxx.

◆ SetDynamicPath()

void TUnixSystem::SetDynamicPath ( const char *  path)
overridevirtual

Set the dynamic path to a new value.

If the value of 'path' is zero, the dynamic path is reset to its default value.

Reimplemented from TSystem.

Definition at line 4679 of file TUnixSystem.cxx.

◆ Setenv()

void TUnixSystem::Setenv ( const char *  name,
const char *  value 
)
overridevirtual

Set environment variable.

Reimplemented from TSystem.

Definition at line 2089 of file TUnixSystem.cxx.

◆ SetFPEMask()

Int_t TUnixSystem::SetFPEMask ( Int_t  mask = kDefaultMask)
overridevirtual

Set which conditions trigger a floating point exception.

Return the previous set of conditions.

Reimplemented from TSystem.

Definition at line 964 of file TUnixSystem.cxx.

◆ SetProgname()

void TUnixSystem::SetProgname ( const char *  name)
overridevirtual

Set the application name (from command line, argv[0]) and copy it in gProgName.

Copy the application pathname in gProgPath. If name is 0 let the system set the actual executable name and path (works on MacOS X and Linux).

Reimplemented from TSystem.

Definition at line 626 of file TUnixSystem.cxx.

◆ SetSockOpt()

int TUnixSystem::SetSockOpt ( int  sock,
int  option,
int  val 
)
overridevirtual

Set socket option.

Reimplemented from TSystem.

Definition at line 3409 of file TUnixSystem.cxx.

◆ SigAlarmInterruptsSyscalls()

void TUnixSystem::SigAlarmInterruptsSyscalls ( Bool_t  set)
overridevirtual

When the argument is true the SIGALRM signal handler is set so that interrupted syscalls will not be restarted by the kernel.

This is typically used in case one wants to put a timeout on an I/O operation. By default interrupted syscalls will always be restarted (for all signals). This can be controlled for each a-synchronous TTimer via the method TTimer::SetInterruptSyscalls().

Reimplemented from TSystem.

Definition at line 873 of file TUnixSystem.cxx.

◆ Sleep()

void TUnixSystem::Sleep ( UInt_t  milliSec)
overridevirtual

Sleep milliSec milliseconds.

Reimplemented from TSystem.

Definition at line 1149 of file TUnixSystem.cxx.

◆ StackTrace()

void TUnixSystem::StackTrace ( )
overridevirtual

Print a stack trace.

Reimplemented from TSystem.

Definition at line 2241 of file TUnixSystem.cxx.

◆ Symlink()

int TUnixSystem::Symlink ( const char *  from,
const char *  to 
)
overridevirtual

Create a symlink from file1 to file2.

Returns 0 when successful, -1 in case of failure.

Reimplemented from TSystem.

Definition at line 1655 of file TUnixSystem.cxx.

◆ Syslog()

void TUnixSystem::Syslog ( ELogLevel  level,
const char *  mess 
)
overridevirtual

Send mess to syslog daemon.

Level is the logging level and mess the message that will be written on the log.

Reimplemented from TSystem.

Definition at line 2614 of file TUnixSystem.cxx.

◆ TempDirectory()

const char * TUnixSystem::TempDirectory ( ) const
overridevirtual

Return a user configured or systemwide directory to create temporary files in.

Reimplemented from TSystem.

Definition at line 1468 of file TUnixSystem.cxx.

◆ TempFileName()

FILE * TUnixSystem::TempFileName ( TString base,
const char *  dir = nullptr 
)
overridevirtual

Create a secure temporary file by appending a unique 6 letter string to base.

The file will be created in a standard (system) directory or in the directory provided in dir. The full filename is returned in base and a filepointer is returned for safely writing to the file (this avoids certain security problems). Returns 0 in case of error.

Reimplemented from TSystem.

Definition at line 1486 of file TUnixSystem.cxx.

◆ Umask()

int TUnixSystem::Umask ( Int_t  mask)
overridevirtual

Set the process file creation mode mask.

Reimplemented from TSystem.

Definition at line 1861 of file TUnixSystem.cxx.

◆ UnixFilestat()

int TUnixSystem::UnixFilestat ( const char *  fpath,
FileStat_t buf 
)
staticprotected

Get info about a file.

Info is returned in the form of a FileStat_t structure (see TSystem.h). The function returns 0 in case of success and 1 if the file could not be stat'ed.

Definition at line 4017 of file TUnixSystem.cxx.

◆ UnixFSstat()

int TUnixSystem::UnixFSstat ( const char *  path,
Long_t id,
Long_t bsize,
Long_t blocks,
Long_t bfree 
)
staticprotected

Get info about a file system: id, bsize, bfree, blocks.

Id is file system type (machine dependend, see statfs()) Bsize is block size of file system Blocks is total number of blocks in file system Bfree is number of free blocks in file system The function returns 0 in case of success and 1 if the file system could not be stat'ed.

Definition at line 4061 of file TUnixSystem.cxx.

◆ UnixGetdirentry()

const char * TUnixSystem::UnixGetdirentry ( void dir)
staticprotected

Returns the next directory entry.

Definition at line 3988 of file TUnixSystem.cxx.

◆ UnixHomedirectory() [1/2]

const char * TUnixSystem::UnixHomedirectory ( const char *  user,
char *  path,
char *  mydir 
)
staticprotected

Returns the user's home directory.

Definition at line 3922 of file TUnixSystem.cxx.

◆ UnixHomedirectory() [2/2]

const char * TUnixSystem::UnixHomedirectory ( const char *  user = nullptr)
staticprotected

Returns the user's home directory.

Definition at line 3913 of file TUnixSystem.cxx.

◆ UnixIgnoreSignal()

void TUnixSystem::UnixIgnoreSignal ( ESignals  sig,
Bool_t  ignore 
)
staticprotected

If ignore is true ignore the specified signal, else restore previous behaviour.

Definition at line 3720 of file TUnixSystem.cxx.

◆ UnixMakedir()

int TUnixSystem::UnixMakedir ( const char *  dir)
staticprotected

Make a Unix file system directory.

Returns 0 in case of success and -1 if the directory could not be created (either already exists or illegal path name).

Definition at line 3954 of file TUnixSystem.cxx.

◆ UnixNow()

Long64_t TUnixSystem::UnixNow ( )
staticprotected

Get current time in milliseconds since 0:00 Jan 1 1995.

Definition at line 3825 of file TUnixSystem.cxx.

◆ UnixOpendir()

void * TUnixSystem::UnixOpendir ( const char *  name)
staticprotected

Open a directory.

Definition at line 3962 of file TUnixSystem.cxx.

◆ UnixRecv()

int TUnixSystem::UnixRecv ( int  sock,
void buffer,
int  length,
int  flag 
)
staticprotected

Receive exactly length bytes into buffer.

Returns number of bytes received. Returns -1 in case of error, -2 in case of MSG_OOB and errno == EWOULDBLOCK, -3 in case of MSG_OOB and errno == EINVAL and -4 in case of kNoBlock and errno == EWOULDBLOCK. Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).

Definition at line 4486 of file TUnixSystem.cxx.

◆ UnixResetSignal()

void TUnixSystem::UnixResetSignal ( ESignals  sig)
staticprotected

Restore old signal handler for specified signal.

Definition at line 3799 of file TUnixSystem.cxx.

◆ UnixResetSignals()

void TUnixSystem::UnixResetSignals ( )
staticprotected

Restore old signal handlers.

Definition at line 3814 of file TUnixSystem.cxx.

◆ UnixSelect()

int TUnixSystem::UnixSelect ( Int_t  nfds,
TFdSet *  readready,
TFdSet *  writeready,
Long_t  timeout 
)
staticprotected

Wait for events on the file descriptors specified in the readready and writeready masks or for timeout (in milliseconds) to occur.

Returns the number of ready descriptors, or 0 in case of timeout, or < 0 in case of an error, with -2 being EINTR and -3 EBADF. In case of EINTR the errno has been reset and the method can be called again.

Definition at line 3879 of file TUnixSystem.cxx.

◆ UnixSend()

int TUnixSystem::UnixSend ( int  sock,
const void buffer,
int  length,
int  flag 
)
staticprotected

Send exactly length bytes from buffer.

Returns -1 in case of error, otherwise number of sent bytes. Returns -4 in case of kNoBlock and errno == EWOULDBLOCK. Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).

Definition at line 4536 of file TUnixSystem.cxx.

◆ UnixSetitimer()

int TUnixSystem::UnixSetitimer ( Long_t  ms)
staticprotected

Set interval timer to time-out in ms milliseconds.

Definition at line 3853 of file TUnixSystem.cxx.

◆ UnixSigAlarmInterruptsSyscalls()

void TUnixSystem::UnixSigAlarmInterruptsSyscalls ( Bool_t  set)
staticprotected

When the argument is true the SIGALRM signal handler is set so that interrupted syscalls will not be restarted by the kernel.

This is typically used in case one wants to put a timeout on an I/O operation. By default interrupted syscalls will always be restarted (for all signals). This can be controlled for each a-synchronous TTimer via the method TTimer::SetInterruptSyscalls().

Definition at line 3755 of file TUnixSystem.cxx.

◆ UnixSignal()

void TUnixSystem::UnixSignal ( ESignals  sig,
SigHandler_t  h 
)
staticprotected

Set a signal handler for a signal.

Definition at line 3681 of file TUnixSystem.cxx.

◆ UnixSigname()

const char * TUnixSystem::UnixSigname ( ESignals  sig)
staticprotected

Return the signal name associated with a signal.

Definition at line 3791 of file TUnixSystem.cxx.

◆ UnixTcpConnect()

int TUnixSystem::UnixTcpConnect ( const char *  hostname,
int  port,
int  tcpwindowsize 
)
staticprotected

Open a TCP/IP connection to server and connect to a service (i.e.

port). Use tcpwindowsize to specify the size of the receive buffer, it has to be specified here to make sure the window scale option is set (for tcpwindowsize > 65KB and for platforms supporting window scaling). Is called via the TSocket constructor. Returns -1 in case of error.

Definition at line 4123 of file TUnixSystem.cxx.

◆ UnixTcpService()

int TUnixSystem::UnixTcpService ( int  port,
Bool_t  reuse,
int  backlog,
int  tcpwindowsize 
)
staticprotected

Open a socket, bind to it and start listening for TCP/IP connections on the port.

If reuse is true reuse the address, backlog specifies how many sockets can be waiting to be accepted. If port is 0 a port scan will be done to find a free port. This option is mutual exlusive with the reuse option. Use tcpwindowsize to specify the size of the receive buffer, it has to be specified here to make sure the window scale option is set (for tcpwindowsize > 65KB and for platforms supporting window scaling). Returns socket fd or -1 if socket() failed, -2 if bind() failed or -3 if listen() failed.

Definition at line 4275 of file TUnixSystem.cxx.

◆ UnixUdpConnect()

int TUnixSystem::UnixUdpConnect ( const char *  hostname,
int  port 
)
staticprotected

Creates a UDP socket connection Is called via the TSocket constructor.

Returns -1 in case of error.

Definition at line 4175 of file TUnixSystem.cxx.

◆ UnixUdpService()

int TUnixSystem::UnixUdpService ( int  port,
int  backlog 
)
staticprotected

Open a socket, bind to it and start listening for UDP connections on the port.

If reuse is true reuse the address, backlog specifies how many sockets can be waiting to be accepted. If port is 0 a port scan will be done to find a free port. This option is mutual exlusive with the reuse option.

Definition at line 4351 of file TUnixSystem.cxx.

◆ UnixUnixConnect() [1/2]

int TUnixSystem::UnixUnixConnect ( const char *  path)
staticprotected

Connect to a Unix domain socket. Returns -1 in case of error.

Definition at line 4227 of file TUnixSystem.cxx.

◆ UnixUnixConnect() [2/2]

int TUnixSystem::UnixUnixConnect ( int  port)
staticprotected

Connect to a Unix domain socket.

Definition at line 4219 of file TUnixSystem.cxx.

◆ UnixUnixService() [1/2]

int TUnixSystem::UnixUnixService ( const char *  sockpath,
int  backlog 
)
staticprotected

Open a socket on path 'sockpath', bind to it and start listening for Unix domain connections to it.

Returns socket fd or -1.

Definition at line 4436 of file TUnixSystem.cxx.

◆ UnixUnixService() [2/2]

int TUnixSystem::UnixUnixService ( int  port,
int  backlog 
)
staticprotected

Open a socket, bind to it and start listening for Unix domain connections to it.

Returns socket fd or -1.

Definition at line 4410 of file TUnixSystem.cxx.

◆ UnixWaitchild()

int TUnixSystem::UnixWaitchild ( )
staticprotected

Wait till child is finished.

Definition at line 4108 of file TUnixSystem.cxx.

◆ Unlink()

int TUnixSystem::Unlink ( const char *  name)
overridevirtual

Unlink, i.e.

remove, a file or directory. Returns 0 when successful, -1 in case of failure.

Reimplemented from TSystem.

Definition at line 1668 of file TUnixSystem.cxx.

◆ Unload()

void TUnixSystem::Unload ( const char *  module)
overridevirtual

Unload a shared library.

Reimplemented from TSystem.

Definition at line 2792 of file TUnixSystem.cxx.

◆ Unsetenv()

void TUnixSystem::Unsetenv ( const char *  name)
overridevirtual

Unset environment variable.

Reimplemented from TSystem.

Definition at line 2105 of file TUnixSystem.cxx.

◆ Utime()

int TUnixSystem::Utime ( const char *  file,
Long_t  modtime,
Long_t  actime 
)
overridevirtual

Set a files modification and access times.

If actime = 0 it will be set to the modtime. Returns 0 on success and -1 in case of error.

Reimplemented from TSystem.

Definition at line 1870 of file TUnixSystem.cxx.

◆ WorkingDirectory()

const char * TUnixSystem::WorkingDirectory ( )
overridevirtual

Return working directory.

Reimplemented from TSystem.

Definition at line 1410 of file TUnixSystem.cxx.


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