Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TProofServLite.cxx
Go to the documentation of this file.
1// @(#)root/proofx:$Id$
2// Author: Gerardo Ganis 12/12/2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, 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/** \class TProofServLite
13\ingroup proofkernel
14
15Version of the PROOF worker server for local running. The client starts
16directly the desired number of these workers; the master and daemons are
17eliminated, optimizing the number of messages exchanged and created / destroyed.
18
19*/
20
21//////////////////////////////////////////////////////////////////////////
22// //
23// TProofServLite //
24// //
25// TProofServLite is the version of the PROOF worker server for local //
26// running. The client starts directly the desired number of these //
27// workers; the master and daemons are eliminated, optimizing the number//
28// of messages exchanged and created / destroyed. //
29// //
30//////////////////////////////////////////////////////////////////////////
31
32#include "RConfigure.h"
33#include <ROOT/RConfig.hxx>
34#include "Riostream.h"
35
36#ifdef WIN32
37 #include <io.h>
38 typedef long off_t;
39 #include <snprintf.h>
40#else
41#include <netinet/in.h>
42#endif
43#include <sys/types.h>
44#include <cstdlib>
45
46#include "TProofServLite.h"
47#include "TEnv.h"
48#include "TError.h"
49#include "TException.h"
50#include "THashList.h"
51#include "TInterpreter.h"
52#include "TMessage.h"
53#include "TProofDebug.h"
54#include "TProof.h"
55#include "TVirtualProofPlayer.h"
56#include "TProofQueryResult.h"
57#include "TRegexp.h"
58#include "TClass.h"
59#include "TROOT.h"
60#include "TSystem.h"
61#include "TPluginManager.h"
62#include "TSocket.h"
63#include "TTimeStamp.h"
64#include "compiledata.h"
65
66// debug hook
67static volatile Int_t gProofServDebug = 1;
68
69//----- Interrupt signal handler -----------------------------------------------
70////////////////////////////////////////////////////////////////////////////////
71
74public:
77 Bool_t Notify() override;
78};
79
80////////////////////////////////////////////////////////////////////////////////
81/// Handle urgent data
82
84{
86 if (TROOT::Initialized()) {
88 }
89 return kTRUE;
90}
91
92//----- SigPipe signal handler -------------------------------------------------
93////////////////////////////////////////////////////////////////////////////////
94
97public:
99 { fServ = s; }
100 Bool_t Notify() override;
101};
102
103////////////////////////////////////////////////////////////////////////////////
104/// Handle sig pipe
105
107{
109 return kTRUE;
110}
111
112//----- Termination signal handler ---------------------------------------------
113////////////////////////////////////////////////////////////////////////////////
114
117public:
120 Bool_t Notify() override;
121};
122
123////////////////////////////////////////////////////////////////////////////////
124/// Handle termination
125
127{
128 Printf("TProofServLiteTerminationHandler::Notify: wake up!");
129
131 return kTRUE;
132}
133
134//----- Seg violation signal handler ---------------------------------------------
135////////////////////////////////////////////////////////////////////////////////
136
139public:
142 Bool_t Notify() override;
143};
144
145////////////////////////////////////////////////////////////////////////////////
146/// Handle seg violation
147
149{
150 Printf("**** ");
151 Printf("**** Segmentation violation: terminating ****");
152 Printf("**** ");
154 return kTRUE;
155}
156
157//----- Input handler for messages from parent or master -----------------------
158////////////////////////////////////////////////////////////////////////////////
159
162public:
164 { fServ = s; }
165 Bool_t Notify() override;
166 Bool_t ReadNotify() override { return Notify(); }
167};
168
169////////////////////////////////////////////////////////////////////////////////
170/// Handle input on the socket
171
173{
175
176 return kTRUE;
177}
178
180
181// Hook to the constructor. This is needed to avoid using the plugin manager
182// which may create problems in multi-threaded environments.
183extern "C" {
184 TApplication *GetTProofServLite(Int_t *argc, char **argv, FILE *flog)
185 { return new TProofServLite(argc, argv, flog); }
186}
187
188////////////////////////////////////////////////////////////////////////////////
189/// Main constructor
190
191TProofServLite::TProofServLite(Int_t *argc, char **argv, FILE *flog)
192 : TProofServ(argc, argv, flog)
193{
196}
197
198////////////////////////////////////////////////////////////////////////////////
199/// Finalize the server setup. If master, create the TProof instance to talk
200/// the worker or submaster nodes.
201/// Return 0 on success, -1 on error
202
204{
205 if (gProofDebugLevel > 0)
206 Info("CreateServer", "starting server creation");
207
208 // Get file descriptor for log file
209 if (fLogFile) {
210 // Use the file already open by pmain
211 if ((fLogFileDes = fileno(fLogFile)) < 0) {
212 Error("CreateServer", "resolving the log file description number");
213 return -1;
214 }
215 }
216
217 // Get socket to be used to call back our xpd
218 fSockPath = gEnv->GetValue("ProofServ.OpenSock", "");
219 if (fSockPath.Length() <= 0) {
220 Error("CreateServer", "Socket setup by xpd undefined");
221 return -1;
222 }
223 TString entity = gEnv->GetValue("ProofServ.Entity", "");
224 if (entity.Length() > 0)
225 fSockPath.Insert(0,TString::Format("%s/", entity.Data()));
226
227 // Call back the client
229 if (!fSocket || !(fSocket->IsValid())) {
230 Error("CreateServer", "Failed to open connection to the client");
231 return -1;
232 }
233
234 // Send our ordinal, to allow the client to identify us
235 TMessage msg;
236 msg << fOrdinal;
237 fSocket->Send(msg);
238
239 // Get socket descriptor
240 Int_t sock = fSocket->GetDescriptor();
241
242 // Install interrupt and message input handlers
246
247 // Wait (loop) in worker node to allow debugger to connect
248 if (gEnv->GetValue("Proof.GdbHook",0) == 2) {
249 while (gProofServDebug)
250 ;
251 }
252
253 if (gProofDebugLevel > 0)
254 Info("CreateServer", "Service: %s, ConfDir: %s, IsMaster: %d",
256
257 if (Setup() == -1) {
258 // Setup failure
259 Terminate(0);
260 SendLogFile();
261 return -1;
262 }
263
264 if (!fLogFile) {
266 // If for some reason we failed setting a redirection file for the logs
267 // we cannot continue
268 if (!fLogFile || (fLogFileDes = fileno(fLogFile)) < 0) {
269 Terminate(0);
270 SendLogFile(-98);
271 return -1;
272 }
273 }
274
275 // Everybody expects std::iostream to be available, so load it...
276 ProcessLine("#include <iostream>", kTRUE);
277 ProcessLine("#include <string>",kTRUE); // for std::string std::iostream.
278
279 // Load user functions
280 const char *logon;
281 logon = gEnv->GetValue("Proof.Load", (char *)0);
282 if (logon) {
283 char *mac = gSystem->Which(TROOT::GetMacroPath(), logon, kReadPermission);
284 if (mac)
285 ProcessLine(TString::Format(".L %s", logon), kTRUE);
286 delete [] mac;
287 }
288
289 // Execute logon macro
290 logon = gEnv->GetValue("Proof.Logon", (char *)0);
291 if (logon && !NoLogOpt()) {
292 char *mac = gSystem->Which(TROOT::GetMacroPath(), logon, kReadPermission);
293 if (mac)
294 ProcessFile(logon);
295 delete [] mac;
296 }
297
298 // Save current interpreter context
299 gInterpreter->SaveContext();
300 gInterpreter->SaveGlobalsContext();
301
302 // Avoid spurious messages at first action
303 FlushLogFile();
304
305 // Done
306 return 0;
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Cleanup. Not really necessary since after this dtor there is no
311/// live anyway.
312
314{
315 delete fSocket;
316}
317
318////////////////////////////////////////////////////////////////////////////////
319/// Called when the client is not alive anymore; terminate the session.
320
322{
323 Terminate(0); // will not return from here....
324}
325
326////////////////////////////////////////////////////////////////////////////////
327/// Called when the client is not alive anymore; terminate the session.
328
330{
331 Terminate(0); // will not return from here....
332}
333
334////////////////////////////////////////////////////////////////////////////////
335/// Print the ProofServ logo on standard output.
336/// Return 0 on success, -1 on error
337
339{
340 char str[512];
341
342 if (IsMaster()) {
343 snprintf(str, 512, "**** Welcome to the PROOF server @ %s ****", gSystem->HostName());
344 } else {
345 snprintf(str, 512, "**** PROOF worker server @ %s started ****", gSystem->HostName());
346 }
347
348 if (fSocket->Send(str) != 1+static_cast<Int_t>(strlen(str))) {
349 Error("Setup", "failed to send proof server startup message");
350 return -1;
351 }
352
353 // Get client protocol
354 if ((fProtocol = gEnv->GetValue("ProofServ.ClientVersion", -1)) < 0) {
355 Error("Setup", "remote proof protocol missing");
356 return -1;
357 }
358
359 // The local user
361 if (pw) {
362 fUser = pw->fUser;
363 delete pw;
364 }
365
366 // Work dir and ...
367 fWorkDir = gEnv->GetValue("ProofServ.Sandbox", TString::Format("~/%s", kPROOF_WorkDir));
368 Info("Setup", "fWorkDir: %s", fWorkDir.Data());
369
370 // Get Session tags
371 fTopSessionTag = gEnv->GetValue("ProofServ.SessionTag", "-1");
372 fSessionTag.Form("%s-%s-%ld-%d", fOrdinal.Data(), gSystem->HostName(),
373 (Long_t)TTimeStamp().GetSec(), gSystem->GetPid());
374 if (gProofDebugLevel > 0)
375 Info("Setup", "session tag is %s", fSessionTag.Data());
377
378 // Send session tag to client
380 m << fSessionTag;
381 fSocket->Send(m);
382
383 // Get Session dir (sandbox)
384 if ((fSessionDir = gEnv->GetValue("ProofServ.SessionDir", "-1")) == "-1") {
385 Error("Setup", "Session dir missing");
386 return -1;
387 }
388
389 // Link the session tag to the log file
390 if (gSystem->Getenv("ROOTPROOFLOGFILE")) {
391 TString logfile = gSystem->Getenv("ROOTPROOFLOGFILE");
392 Int_t iord = logfile.Index(TString::Format("-%s", fOrdinal.Data()));
393 if (iord != kNPOS) logfile.Remove(iord);
394 logfile += TString::Format("-%s.log", fSessionTag.Data());
395 gSystem->Symlink(gSystem->Getenv("ROOTPROOFLOGFILE"), logfile);
396 }
397
398 // Goto to the main PROOF working directory
400 if (gProofDebugLevel > 0)
401 Info("Setup", "working directory set to %s", fWorkDir.Data());
402
403 // Common setup
404 if (SetupCommon() != 0) {
405 Error("Setup", "common setup failed");
406 return -1;
407 }
408
409 // Check every two hours if client is still alive
411
412 // Install SigPipe handler to handle kKeepAlive failure
414
415 // Install Termination handler
417
418 // Install seg violation handler
420
421 // Done
422 return 0;
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Terminate the proof server.
427
429{
430 if (fTerminated)
431 // Avoid doubling the exit operations
432 exit(1);
434
435 // Notify
436 Info("Terminate", "starting session termination operations ...");
437
438 // Cleanup session directory
439 if (status == 0) {
440 // make sure we remain in a "connected" directory
442 // needed in case fSessionDir is on NFS ?!
443 gSystem->MakeDirectory(fSessionDir+"/.delete");
445 }
446
447 // Cleanup data directory if empty
450 Info("Terminate", "data directory '%s' has been removed", fDataDir.Data());
451 }
452
453 // Remove input and signal handlers to avoid spurious "signals"
454 // for closing activities executed upon exit()
456
457 // Stop processing events (set a flag to exit the event loop)
458 gSystem->ExitLoop();
459
460 // Notify
461 Printf("Terminate: termination operations ended: quitting!");
462}
463
464////////////////////////////////////////////////////////////////////////////////
465/// Cloning itself via fork.
466
468{
469 if (!mess) {
470 Error("HandleFork", "empty message!");
471 return;
472 }
473
474 // Extract the ordinals of the clones
475 TString clones;
476 (*mess) >> clones;
477 PDB(kGlobal, 1)
478 Info("HandleFork", "cloning to %s", clones.Data());
479
480 TString clone;
481 Int_t from = 0;
482 while (clones.Tokenize(clone, from, " ")) {
483
484 Int_t rc = 0;
485 // Fork
486 if ((rc = Fork()) < 0) {
487 Error("HandleFork", "failed to fork %s", clone.Data());
488 return;
489 }
490
491 // If the child, finalize the setup and return
492 if (rc == 0) {
493 SetupOnFork(clone.Data());
494 return;
495 }
496 }
497
498 // Done
499 return;
500}
501
502////////////////////////////////////////////////////////////////////////////////
503/// Finalize the server setup afetr forking.
504/// Return 0 on success, -1 on error
505
507{
508 if (gProofDebugLevel > 0)
509 Info("SetupOnFork", "finalizing setup of %s", ord);
510
511 // Set the ordinal
512 fOrdinal = ord;
513 TString sord;
514 sord.Form("-%s", fOrdinal.Data());
515
516 // Close the current log file
517 if (fLogFile) {
518 fclose(fLogFile);
519 fLogFileDes = -1;
520 }
521
523 RedirectOutput(sdir.Data(), "a");
524 // If for some reason we failed setting a redirection file for the logs
525 // we cannot continue
526 if (!fLogFile || (fLogFileDes = fileno(fLogFile)) < 0) {
527 Terminate(0);
528 return -1;
529 }
530 FlushLogFile();
531
532 // Eliminate existing symlink
533 void *dirp = gSystem->OpenDirectory(sdir);
534 if (dirp) {
535 TString ent;
536 const char *e = 0;
537 while ((e = gSystem->GetDirEntry(dirp))) {
538 ent.Form("%s/%s", sdir.Data(), e);
539 FileStat_t st;
540 if (gSystem->GetPathInfo(ent.Data(), st) == 0) {
541 if (st.fIsLink && ent.Contains(sord)) {
542 PDB(kGlobal, 1)
543 Info("SetupOnFork","unlinking: %s", ent.Data());
544 gSystem->Unlink(ent);
545 }
546 }
547 }
548 gSystem->FreeDirectory(dirp);
549 }
550
551 // The session tag
552 fSessionTag.Form("%s-%d-%d", gSystem->HostName(), (int)time(0), gSystem->GetPid());
553
554 // Create new symlink
555 TString logfile = gSystem->Getenv("ROOTPROOFLOGFILE");
556 logfile.ReplaceAll("-0.0", sord.Data());
557 gSystem->Setenv("ROOTPROOFLOGFILE", logfile);
558 Int_t iord = logfile.Index(sord.Data());
559 if (iord != kNPOS) logfile.Remove(iord + sord.Length());
560 logfile += TString::Format("-%s.log", fSessionTag.Data());
561 gSystem->Symlink(gSystem->Getenv("ROOTPROOFLOGFILE"), logfile);
562
563 // Get socket to be used to call back our xpd
564 fSockPath = gEnv->GetValue("ProofServ.OpenSock", "");
565 if (fSockPath.Length() <= 0) {
566 Error("CreateServer", "Socket setup by xpd undefined");
567 return -1;
568 }
569 TString entity = gEnv->GetValue("ProofServ.Entity", "");
570 if (entity.Length() > 0)
571 fSockPath.Insert(0, TString::Format("%s/", entity.Data()));
572
573 // Call back the client
575 if (!fSocket || !(fSocket->IsValid())) {
576 Error("CreateServer", "Failed to open connection to the client");
577 return -1;
578 }
579
580 // Send our ordinal, to allow the client to identify us
581 TMessage msg;
582 msg << fOrdinal;
583 fSocket->Send(msg);
584
585 // Get socket descriptor
586 Int_t sock = fSocket->GetDescriptor();
587
588 // Install interrupt and message input handlers
592
593 // Wait (loop) in worker node to allow debugger to connect
594 if (gEnv->GetValue("Proof.GdbHook",0) == 2) {
595 while (gProofServDebug)
596 ;
597 }
598
599 if (gProofDebugLevel > 0)
600 Info("SetupOnFork", "Service: %s, ConfDir: %s, IsMaster: %d",
602
603 if (Setup() == -1) {
604 // Setup failure
605 Terminate(0);
606 SendLogFile();
607 return -1;
608 }
609
610 // Disallow the interpretation of Rtypes.h, TError.h and TGenericClassInfo.h
611 ProcessLine("#define ROOT_Rtypes 0", kTRUE);
612 ProcessLine("#define ROOT_TError 0", kTRUE);
613 ProcessLine("#define ROOT_TGenericClassInfo 0", kTRUE);
614
615 // Save current interpreter context
616 gInterpreter->SaveContext();
617 gInterpreter->SaveGlobalsContext();
618
619 // Done
620 return 0;
621}
@ kPROOF_SESSIONTAG
#define e(i)
Definition RSha256.hxx:103
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Long_t
Definition RtypesCore.h:54
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Ssiz_t kNPOS
Definition RtypesCore.h:117
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassImp(name)
Definition Rtypes.h:382
R__EXTERN TEnv * gEnv
Definition TEnv.h:170
R__EXTERN void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set.
#define gInterpreter
#define PDB(mask, level)
Definition TProofDebug.h:56
R__EXTERN Int_t gProofDebugLevel
Definition TProofDebug.h:54
static volatile Int_t gProofServDebug
TApplication * GetTProofServLite(Int_t *argc, char **argv, FILE *flog)
static volatile Int_t gProofServDebug
const char *const kRM
Definition TProof.h:142
const char *const kPROOF_WorkDir
Definition TProof.h:124
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2503
@ kSigTermination
@ kSigPipe
@ kSigUrgent
@ kSigSegmentationViolation
@ kKeepAlive
Definition TSystem.h:223
@ kReadPermission
Definition TSystem.h:45
@ kWritePermission
Definition TSystem.h:44
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
#define snprintf
Definition civetweb.c:1540
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
virtual Longptr_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=nullptr)
Process a single command line, either a C++ statement or an interpreter command starting with a "....
virtual Longptr_t ProcessFile(const char *file, Int_t *error=nullptr, Bool_t keep=kFALSE)
Process a file containing a C++ macro.
Bool_t NoLogOpt() const
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition TEnv.cxx:491
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1005
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:979
Bool_t ReadNotify() override
Notify when something can be read from the descriptor associated with this handler.
Bool_t Notify() override
Handle input on the socket.
TProofServLiteInputHandler(TProofServLite *s, Int_t fd)
Bool_t Notify() override
Handle urgent data.
TProofServLiteInterruptHandler(TProofServLite *s)
TProofServLiteSegViolationHandler(TProofServLite *s)
Bool_t Notify() override
Handle seg violation.
TProofServLiteSigPipeHandler(TProofServLite *s)
Bool_t Notify() override
Handle sig pipe.
TProofServLiteTerminationHandler(TProofServLite *s)
Bool_t Notify() override
Handle termination.
Version of the PROOF worker server for local running.
void HandleSigPipe() override
Called when the client is not alive anymore; terminate the session.
~TProofServLite() override
Cleanup.
Int_t Setup() override
Print the ProofServ logo on standard output.
TProofServLiteInterruptHandler * fInterruptHandler
Int_t SetupOnFork(const char *ord)
Finalize the server setup afetr forking.
void HandleFork(TMessage *mess) override
Cloning itself via fork.
void HandleTermination() override
Called when the client is not alive anymore; terminate the session.
void Terminate(Int_t status) override
Terminate the proof server.
Int_t CreateServer() override
Finalize the server setup.
Class providing the PROOF server.
Definition TProofServ.h:66
Int_t fProtocol
Definition TProofServ.h:103
FILE * fLogFile
Definition TProofServ.h:100
TString fDataDir
Definition TProofServ.h:90
TString fSessionDir
Definition TProofServ.h:85
void FlushLogFile()
Reposition the read pointer in the log file to the very end.
TString fService
Definition TProofServ.h:76
Int_t fLogFileDes
Definition TProofServ.h:101
void RedirectOutput(const char *dir=0, const char *mode="w")
Redirect stdout to a log file.
Bool_t fMasterServ
Definition TProofServ.h:111
virtual void HandleUrgentData()
Handle Out-Of-Band data sent by the master or client.
TSocket * fSocket
Definition TProofServ.h:97
Int_t SetupCommon()
Common part (between TProofServ and TXProofServ) of the setup phase.
virtual Int_t HandleSocketInput(TMessage *mess, Bool_t all)
Process input coming from the client or from the master server.
TString fSessionTag
Definition TProofServ.h:83
Bool_t IsMaster() const
Definition TProofServ.h:293
TString fOrdinal
Definition TProofServ.h:104
TString fWorkDir
Definition TProofServ.h:81
TString fTopSessionTag
Definition TProofServ.h:84
friend class TProofServLite
Definition TProofServ.h:68
TString fConfDir
Definition TProofServ.h:79
virtual Int_t Fork()
Fork a child.
Bool_t UnlinkDataDir(const char *path)
Scan recursively the datadir and unlink it if empty Return kTRUE if it can be unlinked,...
TString fUser
Definition TProofServ.h:77
virtual void SendLogFile(Int_t status=0, Int_t start=-1, Int_t end=-1)
Send log file to master.
static const char * GetMacroPath()
Get macro search path. Static utility function.
Definition TROOT.cxx:2762
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
Definition TROOT.cxx:2910
ESignals GetSignal() const
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
Definition TSocket.cxx:1013
virtual Int_t GetDescriptor() const
Definition TSocket.h:112
virtual Bool_t IsValid() const
Definition TSocket.h:132
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Definition TSocket.cxx:522
Basic string class.
Definition TString.h:139
Ssiz_t Length() const
Definition TString.h:417
TString & Insert(Ssiz_t pos, const char *s)
Definition TString.h:661
const char * Data() const
Definition TString.h:376
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition TString.h:704
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2264
Bool_t IsNull() const
Definition TString.h:414
TString & Remove(Ssiz_t pos)
Definition TString.h:685
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2378
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2356
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:632
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition TString.h:651
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
Definition TSystem.cxx:554
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
Definition TSystem.cxx:1368
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Definition TSystem.cxx:1274
virtual void FreeDirectory(void *dirp)
Free a directory.
Definition TSystem.cxx:845
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
Definition TSystem.cxx:836
virtual int GetPid()
Get process id.
Definition TSystem.cxx:707
virtual const char * Getenv(const char *env)
Get environment variable.
Definition TSystem.cxx:1665
virtual int MakeDirectory(const char *name)
Make a directory.
Definition TSystem.cxx:827
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition TSystem.cxx:653
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.
Definition TSystem.cxx:1398
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition TSystem.cxx:1296
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Definition TSystem.cxx:853
virtual void ExitLoop()
Exit from event loop.
Definition TSystem.cxx:392
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Definition TSystem.cxx:862
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
Definition TSystem.cxx:532
virtual const char * HostName()
Return the system's host name.
Definition TSystem.cxx:303
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition TSystem.cxx:1548
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
Definition TSystem.cxx:542
virtual void Setenv(const char *name, const char *value)
Set environment variable.
Definition TSystem.cxx:1649
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
Definition TSystem.cxx:1032
virtual int Unlink(const char *name)
Unlink, i.e.
Definition TSystem.cxx:1381
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition TSystem.cxx:1601
The TTimeStamp encapsulates seconds and ns since EPOCH.
Definition TTimeStamp.h:45
Bool_t fIsLink
Definition TSystem.h:130
TString fUser
Definition TSystem.h:139
TMarker m
Definition textangle.C:8