Logo ROOT  
Reference Guide
TWinNTSystem.h
Go to the documentation of this file.
1 // @(#)root/winnt:$Id$
2 // Author: Fons Rademakers 15/09/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TWinNTSystem
14 #define ROOT_TWinNTSystem
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TWinNTSystem //
19 // //
20 // Class providing an interface to the Windows NT Operating System. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TSystem.h"
25 #include <string>
26 
27 #if !defined(__CINT__)
28  #include "Windows4Root.h"
29  #include <commctrl.h>
30 #else
31  typedef void* HANDLE;
32  struct WIN32_FIND_DATA;
33  typedef void* HIMAGELIST;
34  typedef void* HICON;
35  typedef UChar_t BOOL;
36  struct FILE;
37 #endif
38 
39 #ifndef MAX_SID_SIZE
40 #define MAX_SID_SIZE 1024
41 #endif
42 #define MAX_NAME_STRING 1024
43 
44 #define SID_GROUP 0
45 #define SID_MEMBER 1
46 
47 struct passwd {
48  char *pw_name; // user name
49  char *pw_passwd; // user password
50  int pw_uid; // user ID
51  int pw_gid; // user's group ID
52  int pw_quota; //
53  char *pw_gecos; // user's real (long) name
54  char *pw_dir; // user home directory
55  char *pw_shell; // shell command
56  char *pw_group; // user's group name
57 };
58 
59 struct group {
60  char *gr_name; // group name
61  char *gr_passwd; // group password
62  int gr_gid; // group id
63  char **gr_mem; // group members
64 };
65 
66 
67 class TWinNTSystem : public TSystem {
68 public:
69  // pointer to message handler func
70  typedef Bool_t (*ThreadMsgFunc_t)(MSG*);
71 
72 private:
73  struct group *fGroups{nullptr}; // Groups on local computer
74  struct passwd *fPasswords{nullptr}; // Users on local computer
75  int fNbUsers{0}; // Number of users on local computer
76  int fNbGroups{0}; // Number of groups on local computer
77  int fActUser{-1}; // Index of actual user in User list
78  Bool_t fGroupsInitDone{kFALSE}; // Flag used for Users and Groups initialization
79  Bool_t fFirstFile{kFALSE}; // Flag used by OpenDirectory/GetDirEntry
80 
81  HANDLE fhProcess; // Handle of the current process
82  void *fGUIThreadHandle{nullptr}; // handle of GUI server (aka command) thread
83  ULong_t fGUIThreadId{0}; // id of GUI server (aka command) thread
84  std::string fDirNameBuffer; // The string buffer to hold path name
85  WIN32_FIND_DATA fFindFileData; // Structure to look for files (aka OpenDir under UNIX)
86 
90  Bool_t CountMembers(const char *lpszGroupName);
91  const char *GetLinkedLibraries() override;
93  Long_t LookupSID (const char *lpszAccountName, int what, int &groupIdx, int &memberIdx);
94  Bool_t CollectMembers(const char *lpszGroupName, int &groupIdx, int &memberIdx);
97  void DoBeep(Int_t freq=-1, Int_t duration=-1) const override;
98 
99  static void ThreadStub(void *Parameter) {((TWinNTSystem *)Parameter)->TimerThread();}
100  void TimerThread();
101  void FillWithHomeDirectory(const char *userName, char *mydir) const;
102  char *GetWorkingDirectory(char driveletter) const;
103 
104 
105 protected:
106  static int WinNTUnixConnect(int port);
107  static int WinNTUnixConnect(const char *path);
108  static int WinNTUdpConnect(const char *hostname, int port);
109 
110 public:
111  TWinNTSystem();
112  virtual ~TWinNTSystem();
113 
114  //---- non-TSystem methods ----------------------------------
115  HANDLE GetProcess();
117 
118  //---- Misc -------------------------------------------------
119  Bool_t Init() override;
120  const char *BaseName(const char *name) override;
121  void SetProgname(const char *name) override;
122  const char *GetError() override;
123  const char *HostName() override;
124  void *GetGUIThreadHandle() const {return fGUIThreadHandle;}
127  void NotifyApplicationCreated() override;
128 
129 
130  //---- EventLoop --------------------------------------------
131  Bool_t ProcessEvents() override;
132  void DispatchOneEvent(Bool_t pendingOnly = kFALSE) override;
133  void ExitLoop() override;
134  Int_t Select(TList *active, Long_t timeout) override;
135  Int_t Select(TFileHandler *fh, Long_t timeout) override;
136 
137  //---- Handling of system events ----------------------------
138  void DispatchSignals(ESignals sig);
139  void AddSignalHandler(TSignalHandler *sh) override;
141  void ResetSignal(ESignals sig, Bool_t reset = kTRUE) override;
142  void ResetSignals() override;
143  void IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE) override;
144  void AddFileHandler(TFileHandler *fh) override;
146  void StackTrace() override;
147 
148  //---- Floating Point Exceptions Control --------------------
149  Int_t GetFPEMask() override;
150  Int_t SetFPEMask(Int_t mask = kDefaultMask) override;
151 
152  //---- Processes --------------------------------------------
153  int Exec(const char *shellcmd) override;
154  FILE *OpenPipe(const char *shellcmd, const char *mode) override;
155  int ClosePipe(FILE *pipe) override;
156  void Exit(int code, Bool_t mode = kTRUE) override;
157  void Abort(int code = 0) override;
158  int GetPid() override;
159 
160  //---- Environment manipulation -----------------------------
161  const char *Getenv(const char *name) override;
162  void Setenv(const char *name, const char *value) override;
163 
164  //---- Directories ------------------------------------------
165  int mkdir(const char *name, Bool_t recursive = kFALSE) override;
166  int MakeDirectory(const char *name) override;
167  Bool_t ChangeDirectory(const char *path) override;
168  const char *GetDirEntry(void *dirp) override;
169  const char *DirName(const char *pathname) override;
170  TString GetDirName(const char *pathname) override;
171  void FreeDirectory(void *dirp) override;
172  void *OpenDirectory(const char *name) override;
173  const char *WorkingDirectory(char driveletter);
174  const char *WorkingDirectory() override;
175  std::string GetWorkingDirectory() const override;
176  const char *HomeDirectory(const char *userName=0) override;
177  std::string GetHomeDirectory(const char *userName = nullptr) const override;
178  const char *TempDirectory() const override;
179  FILE *TempFileName(TString &base, const char *dir = nullptr) override;
180 
181  //---- Users & Groups ---------------------------------------
182  Int_t GetUid(const char *user = nullptr) override;
183  Int_t GetGid(const char *group = nullptr) override;
184  Int_t GetEffectiveUid() override;
185  Int_t GetEffectiveGid() override;
186  UserGroup_t *GetUserInfo(Int_t uid) override;
187  UserGroup_t *GetUserInfo(const char *user = nullptr) override;
188  UserGroup_t *GetGroupInfo(Int_t gid) override;
189  UserGroup_t *GetGroupInfo(const char *group = nullptr) override;
190 
191  //---- Paths & Files ----------------------------------------
192  const char DriveName(const char *pathname="/");
193  const char *PrependPathName(const char *dir, TString& name) override;
194  Bool_t ExpandPathName(TString &patbuf) override;
195  char *ExpandPathName(const char *path) override;
196  Bool_t AccessPathName(const char *path, EAccessMode mode = kFileExists) override;
197  Bool_t IsPathLocal(const char *path) override;
198  Bool_t IsAbsoluteFileName(const char *dir) override;
199  int CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE) override;
200  int Rename(const char *from, const char *to) override;
201  int Link(const char *from, const char *to) override;
202  int Symlink(const char *from, const char *to) override;
203  int Unlink(const char *name) override;
204  int SetNonBlock(int fd);
205  int GetPathInfo(const char *path, FileStat_t &buf) override;
206  int GetFsInfo(const char *path, Long_t *id, Long_t *bsize,
207  Long_t *blocks, Long_t *bfree) override;
208  int Chmod(const char *file, UInt_t mode) override;
209  int Umask(Int_t mask) override;
210  int Utime(const char *file, Long_t modtime, Long_t actime) override;
211  const char *UnixPathName(const char *unixpathname) override;
212  const char *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists) override;
213  TList *GetVolumes(Option_t *opt = "") const override;
214 
215  //---- Standard Output redirection --------------------------
216  Int_t RedirectOutput(const char *name, const char *mode = "a", RedirectHandle_t *h = nullptr) override;
217 
218  //---- Dynamic Loading --------------------------------------
219  void AddDynamicPath(const char *dir) override;
220  const char *GetDynamicPath() override;
221  void SetDynamicPath(const char *path) override;
222  const char *FindDynamicLibrary(TString &lib, Bool_t quiet = kFALSE) override;
223  int Load(const char *module, const char *entry = "", Bool_t system = kFALSE) override;
224  const char *GetLibraries(const char *regexp = "",
225  const char *option = "",
226  Bool_t isRegexp = kTRUE) override;
227 
228  //---- Time & Date -------------------------------------------
229  TTime Now() override;
230  void AddTimer(TTimer *ti) override;
231  TTimer *RemoveTimer(TTimer *ti) override;
232  void Sleep(UInt_t milliSec) override;
235 
236  //---- RPC --------------------------------------------------
237  int ConnectService(const char *servername, int port, int tcpwindowsize, const char *protocol = "tcp");
238  TInetAddress GetHostByName(const char *server) override;
239  TInetAddress GetPeerName(int sock) override;
240  TInetAddress GetSockName(int sock) override;
241  int GetServiceByName(const char *service) override;
242  char *GetServiceByPort(int port) override;
243  int OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp") override;
244  int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1) override;
245  int AnnounceUdpService(int port, int backlog) override;
246  int AnnounceUnixService(int port, int backlog) override;
247  int AnnounceUnixService(const char *sockpath, int backlog) override;
248  int AcceptConnection(int sock) override;
249  void CloseConnection(int sock, Bool_t force = kFALSE) override;
250  int RecvRaw(int sock, void *buffer, int length, int flag) override;
251  int SendRaw(int sock, const void *buffer, int length, int flag) override;
252  int RecvBuf(int sock, void *buffer, int length) override;
253  int SendBuf(int sock, const void *buffer, int length) override;
254  int SetSockOpt(int sock, int opt, int val) override;
255  int GetSockOpt(int sock, int opt, int *val) override;
256 
257  //---- System, CPU and Memory info
258  Int_t GetSysInfo(SysInfo_t *info) const override;
259  Int_t GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const override;
260  Int_t GetMemInfo(MemInfo_t *info) const override;
261  Int_t GetProcInfo(ProcInfo_t *info) const override;
262 
264 };
265 
266 R__EXTERN ULong_t gConsoleWindow; // console window handle
267 
268 #endif
TWinNTSystem::AnnounceUdpService
int AnnounceUdpService(int port, int backlog) override
Announce UDP service.
Definition: TWinNTSystem.cxx:5390
TWinNTSystem::PrependPathName
const char * PrependPathName(const char *dir, TString &name) override
Concatenate a directory and a file name.
Definition: TWinNTSystem.cxx:2545
TWinNTSystem
Definition: TWinNTSystem.h:67
TWinNTSystem::fhProcess
HANDLE fhProcess
Definition: TWinNTSystem.h:81
TWinNTSystem::IgnoreSignal
void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE) override
If ignore is true ignore the specified signal, else restore previous behaviour.
Definition: TWinNTSystem.cxx:1424
TWinNTSystem::GetDirEntry
const char * GetDirEntry(void *dirp) override
Returns the next directory entry.
Definition: TWinNTSystem.cxx:1932
TWinNTSystem::GetLinkedLibraries
const char * GetLinkedLibraries() override
Get list of shared libraries loaded at the start of the executable.
Definition: TWinNTSystem.cxx:4099
Windows4Root.h
TWinNTSystem::Init
Bool_t Init() override
Initialize WinNT system interface.
Definition: TWinNTSystem.cxx:1069
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
gConsoleWindow
R__EXTERN ULong_t gConsoleWindow
Definition: TWinNTSystem.h:266
TWinNTSystem::ResetSignal
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,...
Definition: TWinNTSystem.cxx:1407
TWinNTSystem::GetRealTime
Double_t GetRealTime()
Definition: TWinNTSystem.cxx:4416
TWinNTSystem::GetDirName
TString GetDirName(const char *pathname) override
Return the directory name in pathname.
Definition: TWinNTSystem.cxx:2383
TWinNTSystem::WinNTUnixConnect
static int WinNTUnixConnect(int port)
Connect to a Unix domain socket.
Definition: TWinNTSystem.cxx:5185
TWinNTSystem::fDirNameBuffer
std::string fDirNameBuffer
Definition: TWinNTSystem.h:84
TWinNTSystem::ExitLoop
void ExitLoop() override
Exit from event loop.
Definition: TWinNTSystem.cxx:1743
Option_t
const char Option_t
Definition: RtypesCore.h:66
ProcInfo_t
Definition: TSystem.h:192
TWinNTSystem::CheckSignals
Bool_t CheckSignals(Bool_t sync)
Check if some signals were raised and call their Notify() member.
Definition: TWinNTSystem.cxx:1784
TWinNTSystem::SetSockOpt
int SetSockOpt(int sock, int opt, int val) override
Set socket option.
Definition: TWinNTSystem.cxx:4972
TWinNTSystem::GetHomeDirectory
std::string GetHomeDirectory(const char *userName=nullptr) const override
Return the user's home directory.
Definition: TWinNTSystem.cxx:2187
TWinNTSystem::NotifyApplicationCreated
void NotifyApplicationCreated() override
Hook to tell TSystem that the TApplication object has been created.
Definition: TWinNTSystem.cxx:1304
TWinNTSystem::GetError
const char * GetError() override
Return system error string.
Definition: TWinNTSystem.cxx:1248
TWinNTSystem::SetGUIThreadMsgHandler
void SetGUIThreadMsgHandler(ThreadMsgFunc_t func)
Set the (static part of) the event handler func for GUI messages.
Definition: TWinNTSystem.cxx:1296
TWinNTSystem::TempDirectory
const char * TempDirectory() const override
Return a user configured or systemwide directory to create temporary files in.
Definition: TWinNTSystem.cxx:2230
TWinNTSystem::Unlink
int Unlink(const char *name) override
Unlink, i.e.
Definition: TWinNTSystem.cxx:2848
TWinNTSystem::ThreadStub
static void ThreadStub(void *Parameter)
Definition: TWinNTSystem.h:99
TWinNTSystem::TempFileName
FILE * TempFileName(TString &base, const char *dir=nullptr) override
Create a secure temporary file by appending a unique 6 letter string to base.
Definition: TWinNTSystem.cxx:2252
TSignalHandler
Definition: TSysEvtHandler.h:127
FileStat_t
Definition: TSystem.h:124
TWinNTSystem::fGUIThreadHandle
void * fGUIThreadHandle
Definition: TWinNTSystem.h:82
passwd::pw_group
char * pw_group
Definition: TWinNTSystem.h:56
passwd::pw_gid
int pw_gid
Definition: TWinNTSystem.h:51
TWinNTSystem::fGroups
struct group * fGroups
Definition: TWinNTSystem.h:73
passwd::pw_quota
int pw_quota
Definition: TWinNTSystem.h:52
TWinNTSystem::TWinNTSystem
TWinNTSystem()
ctor
Definition: TWinNTSystem.cxx:978
TWinNTSystem::GetGroupInfo
UserGroup_t * GetGroupInfo(Int_t gid) override
Returns all group info in the UserGroup_t structure.
Definition: TWinNTSystem.cxx:3731
TWinNTSystem::GetSockName
TInetAddress GetSockName(int sock) override
Get Internet Protocol (IP) address of host and port #.
Definition: TWinNTSystem.cxx:4705
TWinNTSystem::BaseName
const char * BaseName(const char *name) override
Base name of a file name.
Definition: TWinNTSystem.cxx:1142
passwd::pw_dir
char * pw_dir
Definition: TWinNTSystem.h:54
passwd::pw_name
char * pw_name
Definition: TWinNTSystem.h:48
TWinNTSystem::RecvRaw
int RecvRaw(int sock, void *buffer, int length, int flag) override
Receive exactly length bytes into buffer.
Definition: TWinNTSystem.cxx:4901
TWinNTSystem::Chmod
int Chmod(const char *file, UInt_t mode) override
Set the file permission bits.
Definition: TWinNTSystem.cxx:3022
TWinNTSystem::mkdir
int mkdir(const char *name, Bool_t recursive=kFALSE) override
Make a file system directory.
Definition: TWinNTSystem.cxx:1860
TSystem
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:266
Int_t
int Int_t
Definition: RtypesCore.h:45
TWinNTSystem::AddDynamicPath
void AddDynamicPath(const char *dir) override
Add a new directory to the dynamic path.
Definition: TWinNTSystem.cxx:4023
TWinNTSystem::GetEffectiveUid
Int_t GetEffectiveUid() override
Returns the effective user id.
Definition: TWinNTSystem.cxx:3561
TWinNTSystem::Symlink
int Symlink(const char *from, const char *to) override
Create a symlink from file1 to file2.
Definition: TWinNTSystem.cxx:2775
TWinNTSystem::fGUIThreadId
ULong_t fGUIThreadId
Definition: TWinNTSystem.h:83
passwd
Definition: TWinNTSystem.h:47
TWinNTSystem::SendRaw
int SendRaw(int sock, const void *buffer, int length, int flag) override
Send exactly length bytes from buffer.
Definition: TWinNTSystem.cxx:4939
TWinNTSystem::RemoveFileHandler
TFileHandler * RemoveFileHandler(TFileHandler *fh) override
Remove a file handler from the list of file handlers.
Definition: TWinNTSystem.cxx:1337
ESignals
ESignals
Definition: TSysEvtHandler.h:107
TWinNTSystem::GetPeerName
TInetAddress GetPeerName(int sock) override
Get Internet Protocol (IP) address of remote host and port #.
Definition: TWinNTSystem.cxx:4672
TWinNTSystem::Load
int Load(const char *module, const char *entry="", Bool_t system=kFALSE) override
Load a shared library.
Definition: TWinNTSystem.cxx:4087
TWinNTSystem::GetEffectiveGid
Int_t GetEffectiveGid() override
Returns the effective group id.
Definition: TWinNTSystem.cxx:3629
TWinNTSystem::GetPid
int GetPid() override
Get process id.
Definition: TWinNTSystem.cxx:3842
TWinNTSystem::GetFPEMask
Int_t GetFPEMask() override
Return the bitmap of conditions that trigger a floating point exception.
Definition: TWinNTSystem.cxx:1555
TWinNTSystem::OpenPipe
FILE * OpenPipe(const char *shellcmd, const char *mode) override
Open a pipe.
Definition: TWinNTSystem.cxx:3826
TWinNTSystem::RecvBuf
int RecvBuf(int sock, void *buffer, int length) override
Receive a buffer headed by a length indicator.
Definition: TWinNTSystem.cxx:4849
group::gr_passwd
char * gr_passwd
Definition: TWinNTSystem.h:61
TWinNTSystem::CollectGroups
Bool_t CollectGroups()
Definition: TWinNTSystem.cxx:3465
TString
Basic string class.
Definition: TString.h:136
TWinNTSystem::HostName
const char * HostName() override
Return the system's host name.
Definition: TWinNTSystem.cxx:1264
ClassDefOverride
#define ClassDefOverride(name, id)
Definition: Rtypes.h:329
TWinNTSystem::OpenConnection
int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp") override
Open a connection to a service on a server.
Definition: TWinNTSystem.cxx:5295
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TWinNTSystem::GetPathInfo
int GetPathInfo(const char *path, FileStat_t &buf) override
Get info about a file.
Definition: TWinNTSystem.cxx:2592
TWinNTSystem::ChangeDirectory
Bool_t ChangeDirectory(const char *path) override
Change directory.
Definition: TWinNTSystem.cxx:1958
TWinNTSystem::ConnectService
int ConnectService(const char *servername, int port, int tcpwindowsize, const char *protocol="tcp")
Connect to service servicename on server servername.
Definition: TWinNTSystem.cxx:5128
TWinNTSystem::GetProcess
HANDLE GetProcess()
Get current process handle.
Definition: TWinNTSystem.cxx:3850
bool
TWinNTSystem::fNbGroups
int fNbGroups
Definition: TWinNTSystem.h:76
TWinNTSystem::GetMemInfo
Int_t GetMemInfo(MemInfo_t *info) const override
Returns ram and swap memory usage info into the MemInfo_t structure.
Definition: TWinNTSystem.cxx:6073
passwd::pw_gecos
char * pw_gecos
Definition: TWinNTSystem.h:53
TWinNTSystem::Exec
int Exec(const char *shellcmd) override
Execute a command.
Definition: TWinNTSystem.cxx:3818
TWinNTSystem::SendBuf
int SendBuf(int sock, const void *buffer, int length) override
Send a buffer headed by a length indicator.
Definition: TWinNTSystem.cxx:4874
RedirectHandle_t
Definition: TSystem.h:203
TWinNTSystem::GetSockOpt
int GetSockOpt(int sock, int opt, int *val) override
Get socket option.
Definition: TWinNTSystem.cxx:5042
passwd::pw_uid
int pw_uid
Definition: TWinNTSystem.h:50
TWinNTSystem::GetLibraries
const char * GetLibraries(const char *regexp="", const char *option="", Bool_t isRegexp=kTRUE) override
Return a space separated list of loaded shared libraries.
Definition: TWinNTSystem.cxx:4253
TWinNTSystem::DispatchOneEvent
void DispatchOneEvent(Bool_t pendingOnly=kFALSE) override
Dispatch a single event in TApplication::Run() loop.
Definition: TWinNTSystem.cxx:1602
TWinNTSystem::Select
Int_t Select(TList *active, Long_t timeout) override
Select on file descriptors. The timeout to is in millisec.
Definition: TWinNTSystem.cxx:4520
group
Definition: TWinNTSystem.h:59
TWinNTSystem::DoBeep
void DoBeep(Int_t freq=-1, Int_t duration=-1) const override
Beep.
Definition: TWinNTSystem.cxx:1282
TWinNTSystem::DispatchSignals
void DispatchSignals(ESignals sig)
Handle and dispatch signals.
Definition: TWinNTSystem.cxx:1752
TTimer
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TWinNTSystem::DispatchTimers
Bool_t DispatchTimers(Bool_t mode)
Handle and dispatch timers.
Definition: TWinNTSystem.cxx:4384
TWinNTSystem::GetProcInfo
Int_t GetProcInfo(ProcInfo_t *info) const override
Returns cpu and memory used by this process into the ProcInfo_t structure.
Definition: TWinNTSystem.cxx:6084
TWinNTSystem::Setenv
void Setenv(const char *name, const char *value) override
Set environment variable.
Definition: TWinNTSystem.cxx:3792
TWinNTSystem::UnixPathName
const char * UnixPathName(const char *unixpathname) override
Convert a pathname to a unix pathname.
Definition: TWinNTSystem.cxx:2485
SysInfo_t
Definition: TSystem.h:150
TSystem.h
TWinNTSystem::CheckDescriptors
Bool_t CheckDescriptors()
Check if there is activity on some file descriptors and call their Notify() member.
Definition: TWinNTSystem.cxx:1814
TWinNTSystem::GetCpuInfo
Int_t GetCpuInfo(CpuInfo_t *info, Int_t sampleTime=1000) const override
Returns cpu load average and load info into the CpuInfo_t structure.
Definition: TWinNTSystem.cxx:6062
TWinNTSystem::GetSysInfo
Int_t 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 s...
Definition: TWinNTSystem.cxx:6050
TWinNTSystem::Now
TTime Now() override
Get current time in milliseconds since 0:00 Jan 1 1995.
Definition: TWinNTSystem.cxx:4482
TWinNTSystem::fNbUsers
int fNbUsers
Definition: TWinNTSystem.h:75
h
#define h(i)
Definition: RSha256.hxx:106
TWinNTSystem::AddFileHandler
void AddFileHandler(TFileHandler *fh) override
Add a file handler to the list of system file handlers.
Definition: TWinNTSystem.cxx:1317
TWinNTSystem::ResetSignals
void ResetSignals() override
Reset signals handlers to previous behaviour.
Definition: TWinNTSystem.cxx:1415
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TWinNTSystem::HandleConsoleEvent
Bool_t HandleConsoleEvent()
Definition: TWinNTSystem.cxx:958
MemInfo_t
Definition: TSystem.h:179
TWinNTSystem::HomeDirectory
const char * HomeDirectory(const char *userName=0) override
Return the user's home directory.
Definition: TWinNTSystem.cxx:2177
Long_t
long Long_t
Definition: RtypesCore.h:54
TTime
Basic time type with millisecond precision.
Definition: TTime.h:27
TWinNTSystem::Utime
int Utime(const char *file, Long_t modtime, Long_t actime) override
Set a files modification and access times.
Definition: TWinNTSystem.cxx:3039
TWinNTSystem::FindFile
const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists) override
Find location of file in a search path.
Definition: TWinNTSystem.cxx:3057
extract_docstrings.module
module
Definition: extract_docstrings.py:39
what
static const char * what
Definition: stlLoader.cc:6
TWinNTSystem::StackTrace
void StackTrace() override
Print a stack trace, if gEnv entry "Root.Stacktrace" is unset or 1, and if the image helper functions...
Definition: TWinNTSystem.cxx:1437
TWinNTSystem::SetNonBlock
int SetNonBlock(int fd)
Make descriptor fd non-blocking.
Definition: TWinNTSystem.cxx:2870
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TWinNTSystem::FreeDirectory
void FreeDirectory(void *dirp) override
Close a WinNT file system directory.
Definition: TWinNTSystem.cxx:1916
TWinNTSystem::DirName
const char * DirName(const char *pathname) override
Return the directory name in pathname.
Definition: TWinNTSystem.cxx:2373
TWinNTSystem::FindDynamicLibrary
const char * FindDynamicLibrary(TString &lib, Bool_t quiet=kFALSE) override
Returns and updates sLib to the path of a dynamic library (searches for library in the dynamic librar...
Definition: TWinNTSystem.cxx:4059
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TWinNTSystem::CollectMembers
Bool_t CollectMembers(const char *lpszGroupName, int &groupIdx, int &memberIdx)
Definition: TWinNTSystem.cxx:3330
TWinNTSystem::SetProgname
void SetProgname(const char *name) override
Set the application name (from command line, argv[0]) and copy it in gProgName.
Definition: TWinNTSystem.cxx:1185
TWinNTSystem::Sleep
void Sleep(UInt_t milliSec) override
Sleep milliSec milli seconds.
Definition: TWinNTSystem.cxx:4512
TWinNTSystem::GetCPUTime
Double_t GetCPUTime()
Definition: TWinNTSystem.cxx:4430
TWinNTSystem::AccessPathName
Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists) override
Returns FALSE if one can access a file using the specified access mode.
Definition: TWinNTSystem.cxx:2506
TWinNTSystem::AddTimer
void AddTimer(TTimer *ti) override
Add timer to list of system timers.
Definition: TWinNTSystem.cxx:4352
group::gr_mem
char ** gr_mem
Definition: TWinNTSystem.h:63
TWinNTSystem::CountMembers
Bool_t CountMembers(const char *lpszGroupName)
Definition: TWinNTSystem.cxx:3145
TWinNTSystem::OpenDirectory
void * OpenDirectory(const char *name) override
Open a directory. Returns 0 if directory does not exist.
Definition: TWinNTSystem.cxx:2035
TWinNTSystem::WinNTUdpConnect
static int WinNTUdpConnect(const char *hostname, int port)
Creates a UDP socket connection Is called via the TSocket constructor.
Definition: TWinNTSystem.cxx:5246
TWinNTSystem::GetWorkingDirectory
std::string GetWorkingDirectory() const override
Return the working directory for the default drive.
Definition: TWinNTSystem.cxx:2122
TWinNTSystem::ThreadMsgFunc_t
Bool_t(* ThreadMsgFunc_t)(MSG *)
Definition: TWinNTSystem.h:70
TWinNTSystem::SetFPEMask
Int_t SetFPEMask(Int_t mask=kDefaultMask) override
Set which conditions trigger a floating point exception.
Definition: TWinNTSystem.cxx:1573
TWinNTSystem::RemoveTimer
TTimer * RemoveTimer(TTimer *ti) override
Remove timer from list of system timers.
Definition: TWinNTSystem.cxx:4360
TWinNTSystem::Exit
void Exit(int code, Bool_t mode=kTRUE) override
Exit the application.
Definition: TWinNTSystem.cxx:3858
TWinNTSystem::~TWinNTSystem
virtual ~TWinNTSystem()
dtor
Definition: TWinNTSystem.cxx:1041
TWinNTSystem::GetDynamicPath
const char * GetDynamicPath() override
Return the dynamic path (used to find shared libraries).
Definition: TWinNTSystem.cxx:4036
EAccessMode
EAccessMode
Definition: TSystem.h:43
TWinNTSystem::IsPathLocal
Bool_t IsPathLocal(const char *path) override
Returns TRUE if the url in 'path' points to the local file system.
Definition: TWinNTSystem.cxx:2533
Double_t
double Double_t
Definition: RtypesCore.h:59
TWinNTSystem::WorkingDirectory
const char * WorkingDirectory() override
Return the working directory for the default drive.
Definition: TWinNTSystem.cxx:2114
TWinNTSystem::InitUsersGroups
Bool_t InitUsersGroups()
Collect local users and groups accounts information.
Definition: TWinNTSystem.cxx:3111
TWinNTSystem::Getenv
const char * Getenv(const char *name) override
Get environment variable.
Definition: TWinNTSystem.cxx:3800
TWinNTSystem::GetGUIThreadId
ULong_t GetGUIThreadId() const
Definition: TWinNTSystem.h:125
TWinNTSystem::AnnounceTcpService
int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize=-1) override
Announce TCP/IP service.
Definition: TWinNTSystem.cxx:5312
TWinNTSystem::LookupSID
Long_t LookupSID(const char *lpszAccountName, int what, int &groupIdx, int &memberIdx)
Take the name and look up a SID so that we can get full domain/user information.
Definition: TWinNTSystem.cxx:3257
group::gr_name
char * gr_name
Definition: TWinNTSystem.h:60
TWinNTSystem::GetUid
Int_t GetUid(const char *user=nullptr) override
Returns the user's id. If user = 0, returns current user's id.
Definition: TWinNTSystem.cxx:3520
TWinNTSystem::GetFsInfo
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.
Definition: TWinNTSystem.cxx:2649
TWinNTSystem::Rename
int Rename(const char *from, const char *to) override
Rename a file. Returns 0 when successful, -1 in case of failure.
Definition: TWinNTSystem.cxx:2579
file
Definition: file.py:1
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
TWinNTSystem::GetGUIThreadHandle
void * GetGUIThreadHandle() const
Definition: TWinNTSystem.h:124
kFileExists
@ kFileExists
Definition: TSystem.h:44
UserGroup_t
Definition: TSystem.h:138
TWinNTSystem::fPasswords
struct passwd * fPasswords
Definition: TWinNTSystem.h:74
TWinNTSystem::AcceptConnection
int AcceptConnection(int sock) override
Accept a connection.
Definition: TWinNTSystem.cxx:5454
TWinNTSystem::AddSignalHandler
void AddSignalHandler(TSignalHandler *sh) override
Add a signal handler to list of system signal handlers.
Definition: TWinNTSystem.cxx:1353
name
char name[80]
Definition: TGX11.cxx:110
TWinNTSystem::GetHostByName
TInetAddress GetHostByName(const char *server) override
Get Internet Protocol (IP) address of host.
Definition: TWinNTSystem.cxx:4617
TFileHandler
Definition: TSysEvtHandler.h:65
TWinNTSystem::CopyFile
int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE) override
Copy a file.
Definition: TWinNTSystem.cxx:2565
TWinNTSystem::TimerThread
void TimerThread()
Special Thread to check asynchronous timers.
Definition: TWinNTSystem.cxx:4371
R__EXTERN
#define R__EXTERN
Definition: DllImport.h:27
TWinNTSystem::DriveName
const char DriveName(const char *pathname="/")
Return the drive letter in pathname.
Definition: TWinNTSystem.cxx:2424
TWinNTSystem::fFirstFile
Bool_t fFirstFile
Definition: TWinNTSystem.h:79
CpuInfo_t
Definition: TSystem.h:165
TWinNTSystem::fActUser
int fActUser
Definition: TWinNTSystem.h:77
TWinNTSystem::GetNbGroups
Bool_t GetNbGroups()
Definition: TWinNTSystem.cxx:3204
passwd::pw_shell
char * pw_shell
Definition: TWinNTSystem.h:55
TWinNTSystem::IsAbsoluteFileName
Bool_t IsAbsoluteFileName(const char *dir) override
Return true if dir is an absolute pathname.
Definition: TWinNTSystem.cxx:2449
TWinNTSystem::Abort
void Abort(int code=0) override
Abort the application.
Definition: TWinNTSystem.cxx:3895
TWinNTSystem::Link
int Link(const char *from, const char *to) override
Create a link from file1 to file2.
Definition: TWinNTSystem.cxx:2717
TWinNTSystem::MakeDirectory
int MakeDirectory(const char *name) override
Make a WinNT file system directory.
Definition: TWinNTSystem.cxx:1895
TInetAddress
This class represents an Internet Protocol (IP) address.
Definition: TInetAddress.h:36
TWinNTSystem::GetVolumes
TList * GetVolumes(Option_t *opt="") const override
Get list of volumes (drives) mounted on the system.
Definition: TWinNTSystem.cxx:2271
passwd::pw_passwd
char * pw_passwd
Definition: TWinNTSystem.h:49
TWinNTSystem::FillWithHomeDirectory
void FillWithHomeDirectory(const char *userName, char *mydir) const
Fill buffer with user's home directory.
Definition: TWinNTSystem.cxx:2197
TWinNTSystem::ExpandPathName
Bool_t ExpandPathName(TString &patbuf) override
Expand a pathname getting rid of special shell characaters like ~.$, etc.
Definition: TWinNTSystem.cxx:2889
TWinNTSystem::AnnounceUnixService
int AnnounceUnixService(int port, int backlog) override
Announce unix domain service.
Definition: TWinNTSystem.cxx:4738
group::gr_gid
int gr_gid
Definition: TWinNTSystem.h:62
CPyCppyy::Parameter
Definition: callcontext.h:13
TWinNTSystem::CloseConnection
void CloseConnection(int sock, Bool_t force=kFALSE) override
Close socket.
Definition: TWinNTSystem.cxx:4829
TWinNTSystem::fFindFileData
WIN32_FIND_DATA fFindFileData
Definition: TWinNTSystem.h:85
TWinNTSystem::ProcessEvents
Bool_t ProcessEvents() override
process pending events, i.e. DispatchOneEvent(kTRUE)
Definition: TWinNTSystem.cxx:1594
TList
A doubly linked list.
Definition: TList.h:44
TWinNTSystem::SetDynamicPath
void SetDynamicPath(const char *path) override
Set the dynamic path to a new value.
Definition: TWinNTSystem.cxx:4046
TWinNTSystem::ClosePipe
int ClosePipe(FILE *pipe) override
Close the pipe.
Definition: TWinNTSystem.cxx:3834
TWinNTSystem::GetUserInfo
UserGroup_t * GetUserInfo(Int_t uid) override
Returns all user info in the UserGroup_t structure.
Definition: TWinNTSystem.cxx:3657
TWinNTSystem::GetServiceByPort
char * GetServiceByPort(int port) override
Get name of internet service.
Definition: TWinNTSystem.cxx:4602
int
TWinNTSystem::fGroupsInitDone
Bool_t fGroupsInitDone
Definition: TWinNTSystem.h:78
TWinNTSystem::RedirectOutput
Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=nullptr) override
Redirect standard output (stdout, stderr) to the specified file.
Definition: TWinNTSystem.cxx:3915
TWinNTSystem::Umask
int Umask(Int_t mask) override
Set the process file creation mode mask.
Definition: TWinNTSystem.cxx:3030
TWinNTSystem::GetServiceByName
int GetServiceByName(const char *service) override
Get port # of internet service.
Definition: TWinNTSystem.cxx:4588
kDefaultMask
@ kDefaultMask
Definition: TSystem.h:84
TWinNTSystem::GetGid
Int_t GetGid(const char *group=nullptr) override
Returns the group's id. If group = 0, returns current user's group.
Definition: TWinNTSystem.cxx:3588
TWinNTSystem::RemoveSignalHandler
TSignalHandler * RemoveSignalHandler(TSignalHandler *sh) override
Remove a signal handler from list of signal handlers.
Definition: TWinNTSystem.cxx:1381