32#include "RConfigure.h"
41#include <netinet/in.h>
64#include "compiledata.h"
130 Printf(
"TProofServLiteTerminationHandler::Notify: wake up!");
153 Printf(
"**** Segmentation violation: terminating ****");
208 Info(
"CreateServer",
"starting server creation");
214 Error(
"CreateServer",
"resolving the log file description number");
222 Error(
"CreateServer",
"Socket setup by xpd undefined");
232 Error(
"CreateServer",
"Failed to open connection to the client");
256 Info(
"CreateServer",
"Service: %s, ConfDir: %s, IsMaster: %d",
351 Error(
"Setup",
"failed to send proof server startup message");
357 Error(
"Setup",
"remote proof protocol missing");
387 Error(
"Setup",
"Session dir missing");
407 Error(
"Setup",
"common setup failed");
438 Info(
"Terminate",
"starting session termination operations ...");
463 Printf(
"Terminate: termination operations ended: quitting!");
472 Error(
"HandleFork",
"empty message!");
480 Info(
"HandleFork",
"cloning to %s", clones.
Data());
484 while (clones.
Tokenize(clone, from,
" ")) {
488 if ((rc =
Fork()) < 0) {
489 Error(
"HandleFork",
"failed to fork %s", clone.
Data());
511 Info(
"SetupOnFork",
"finalizing setup of %s", ord);
545 Info(
"SetupOnFork",
"unlinking: %s", ent.
Data());
568 Error(
"CreateServer",
"Socket setup by xpd undefined");
578 Error(
"CreateServer",
"Failed to open connection to the client");
602 Info(
"SetupOnFork",
"Service: %s, ConfDir: %s, IsMaster: %d",
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.
R__EXTERN Int_t gProofDebugLevel
static volatile Int_t gProofServDebug
TApplication * GetTProofServLite(Int_t *argc, char **argv, FILE *flog)
static volatile Int_t gProofServDebug
const char *const kPROOF_WorkDir
void Printf(const char *fmt,...)
@ kSigSegmentationViolation
R__EXTERN TSystem * gSystem
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=0)
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=0, Bool_t keep=kFALSE)
Process a file containing a C++ macro.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TProofServLiteInterruptHandler(TProofServLite *s)
Bool_t Notify()
Handle urgent data.
Bool_t Notify()
Handle seg violation.
TProofServLiteSegViolationHandler(TProofServLite *s)
TProofServLiteSigPipeHandler(TProofServLite *s)
Bool_t Notify()
Handle sig pipe.
Bool_t Notify()
Handle termination.
TProofServLiteTerminationHandler(TProofServLite *s)
Version of the PROOF worker server for local running.
Int_t CreateServer()
Finalize the server setup.
void HandleSigPipe()
Called when the client is not alive anymore; terminate the session.
TProofServLiteInterruptHandler * fInterruptHandler
Int_t SetupOnFork(const char *ord)
Finalize the server setup afetr forking.
void HandleFork(TMessage *mess)
Cloning itself via fork.
virtual ~TProofServLite()
Cleanup.
Int_t Setup()
Print the ProofServ logo on standard output.
void Terminate(Int_t status)
Terminate the proof server.
void HandleTermination()
Called when the client is not alive anymore; terminate the session.
Class providing the PROOF server.
void FlushLogFile()
Reposition the read pointer in the log file to the very end.
void RedirectOutput(const char *dir=0, const char *mode="w")
Redirect stdout to a log file.
virtual void HandleUrgentData()
Handle Out-Of-Band data sent by the master or client.
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.
friend class TProofServLite
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,...
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.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
ESignals GetSignal() const
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
virtual Int_t GetDescriptor() const
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
TString & Insert(Ssiz_t pos, const char *s)
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual int GetPid()
Get process id.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual int MakeDirectory(const char *name)
Make a directory.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
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.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual void ExitLoop()
Exit from event loop.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
virtual const char * HostName()
Return the system's host name.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
virtual void Setenv(const char *name, const char *value)
Set environment variable.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
The TTimeStamp encapsulates seconds and ns since EPOCH.