32#include "RConfigure.h"
41#include <netinet/in.h>
64#include "compiledata.h"
128 Printf(
"TProofServLiteTerminationHandler::Notify: wake up!");
151 Printf(
"**** Segmentation violation: terminating ****");
206 Info(
"CreateServer",
"starting server creation");
212 Error(
"CreateServer",
"resolving the log file description number");
220 Error(
"CreateServer",
"Socket setup by xpd undefined");
230 Error(
"CreateServer",
"Failed to open connection to the client");
254 Info(
"CreateServer",
"Service: %s, ConfDir: %s, IsMaster: %d",
349 Error(
"Setup",
"failed to send proof server startup message");
355 Error(
"Setup",
"remote proof protocol missing");
385 Error(
"Setup",
"Session dir missing");
405 Error(
"Setup",
"common setup failed");
436 Info(
"Terminate",
"starting session termination operations ...");
461 Printf(
"Terminate: termination operations ended: quitting!");
470 Error(
"HandleFork",
"empty message!");
478 Info(
"HandleFork",
"cloning to %s", clones.
Data());
482 while (clones.
Tokenize(clone, from,
" ")) {
486 if ((rc =
Fork()) < 0) {
487 Error(
"HandleFork",
"failed to fork %s", clone.
Data());
509 Info(
"SetupOnFork",
"finalizing setup of %s", ord);
543 Info(
"SetupOnFork",
"unlinking: %s", ent.
Data());
566 Error(
"CreateServer",
"Socket setup by xpd undefined");
576 Error(
"CreateServer",
"Failed to open connection to the client");
600 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,...)
Formats a string in a circular formatting buffer and prints the string.
@ 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=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.
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.
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.
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.