JobCEnv.cxx File Reference

#include "JobControl/JobCEnv.h"
#include <getopt.h>
#include <sys/types.h>
#include <dirent.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <csignal>
#include "TEnv.h"
#include "TROOT.h"
#include "TSystem.h"
#include "JobControl/JobCRootEnv.h"
#include "JobControl/JobCleaner.h"
#include "JobControl/JobCFloatXImp.h"
#include "JobControl/IsArgMacroFile.h"
#include "MessageService/MsgService.h"
#include "MinosObjectMap/MomNavigator.h"

Go to the source code of this file.

Defines

#define GETOPTDONE   (-1)

Functions

 CVSID ("$Id: JobCEnv.cxx,v 1.43 2010/04/28 15:49:31 rhatcher Exp $")
static void gsSIGHUPhandler (int)
static void gsSIGTERMhandler (int)
static void gsSIGUSR1handler (int)
int JobCEnvSetenv (const char *name, const char *value)

Variables

bool gsSIGHUP = false
bool gsSIGTERM = false
bool gsSIGUSR1 = false

Define Documentation

#define GETOPTDONE   (-1)

Definition at line 17 of file JobCEnv.cxx.

Referenced by JobCRootEnv::JobCRootEnv(), and JobCEnv::ProcessCommandLine().


Function Documentation

CVSID ( "$Id: JobCEnv.  cxx,
v 1.43 2010/04/28 15:49:31 rhatcher Exp $"   
)
static void gsSIGHUPhandler ( int   )  [static]

Definition at line 45 of file JobCEnv.cxx.

References gsSIGHUP.

Referenced by JobCEnv::SetSignalHandlers().

00045 { gsSIGHUP = true; }

static void gsSIGTERMhandler ( int   )  [static]

Definition at line 46 of file JobCEnv.cxx.

References gsSIGTERM.

Referenced by JobCEnv::SetSignalHandlers().

00046 { gsSIGTERM = true; }

static void gsSIGUSR1handler ( int   )  [static]

Definition at line 47 of file JobCEnv.cxx.

References gsSIGUSR1.

Referenced by JobCEnv::SetSignalHandlers().

00047 { gsSIGUSR1 = true; }

int JobCEnvSetenv ( const char *  name,
const char *  value 
)

Definition at line 49 of file JobCEnv.cxx.

Referenced by JobCEnv::ProcessCommandLine().

00049                                                        {
00050   // A transportable "setenv" that works on both Linux and IRIX
00051   //    int setenv(const char *name, const char *value, int overwrite);  
00052   // found in Linux's <stdlib.h> is NOT POSIX standard
00053   // This is just like TUnixSystem::Setenv, but avoids
00054   // entanglement with ROOT at this stage
00055 
00056   char *s = new char [strlen(name)+strlen(value)+2];  // space for = & \0
00057   sprintf(s,"%s=%s",name,value);
00058   int success = ::putenv(s); // putenv is more standard than setenv
00059   // passed string becomes part of the environment, so altering
00060   // the string changes the environment -- DON'T delete 's'
00061   return success;
00062 }


Variable Documentation

bool gsSIGHUP = false

Definition at line 39 of file JobCEnv.cxx.

Referenced by JobCEnv::ContinueRun(), and gsSIGHUPhandler().

bool gsSIGTERM = false

Definition at line 40 of file JobCEnv.cxx.

Referenced by JobCEnv::ContinueRun(), and gsSIGTERMhandler().

bool gsSIGUSR1 = false

Definition at line 41 of file JobCEnv.cxx.

Referenced by JobCEnv::ContinueRun(), and gsSIGUSR1handler().


Generated on 24 Jul 2018 for loon by  doxygen 1.6.1