Back to index

nordugrid-arc-nox  1.1.0~rc6
Classes | Defines | Functions | Variables
job.cpp File Reference
#include <cstdlib>
#include <cerrno>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <arc/DateTime.h>
#include <arc/Thread.h>
#include <arc/StringConv.h>
#include <arc/FileUtils.h>
#include <arc/security/ArcPDP/Evaluator.h>
#include <arc/security/ArcPDP/EvaluatorLoader.h>
#include <arc/message/SecAttr.h>
#include <arc/credential/Credential.h>
#include <arc/ws-addressing/WSA.h>
#include "grid-manager/conf/environment.h"
#include "grid-manager/conf/conf_pre.h"
#include "grid-manager/jobs/job.h"
#include "grid-manager/jobs/plugins.h"
#include "grid-manager/jobs/job_request.h"
#include "grid-manager/jobs/commfifo.h"
#include "grid-manager/run/run_plugin.h"
#include "grid-manager/files/info_files.h"
#include "job.h"

Go to the source code of this file.

Classes

class  AutoPointer< T >

Defines

#define JOB_POLICY_OPERATION_URN   "http://www.nordugrid.org/schemas/policy-arc/types/a-rex/joboperation"

Functions

static ARexJobFailure setfail (JobReqResult res)
static bool normalize_filename (std::string &filename)

Variables

static bool env_initialized = false
Glib::StaticMutex env_lock = GLIBMM_STATIC_MUTEX_INIT

Define Documentation

#define JOB_POLICY_OPERATION_URN   "http://www.nordugrid.org/schemas/policy-arc/types/a-rex/joboperation"

Definition at line 37 of file job.cpp.


Function Documentation

static bool normalize_filename ( std::string &  filename) [static]

Definition at line 668 of file job.cpp.

                                                    {
  std::string::size_type p = 0;
  if(filename[0] != G_DIR_SEPARATOR) filename.insert(0,G_DIR_SEPARATOR_S);
  for(;p != std::string::npos;) {
    if((filename[p+1] == '.') &&
       (filename[p+2] == '.') &&
       ((filename[p+3] == 0) || (filename[p+3] == G_DIR_SEPARATOR))
      ) {
      std::string::size_type pr = std::string::npos;
      if(p > 0) pr = filename.rfind(G_DIR_SEPARATOR,p-1);
      if(pr == std::string::npos) return false;
      filename.erase(pr,p-pr+3);
      p=pr;
    } else if((filename[p+1] == '.') && (filename[p+2] == G_DIR_SEPARATOR)) {
      filename.erase(p,2);
    } else if(filename[p+1] == G_DIR_SEPARATOR) {
      filename.erase(p,1);
    };
    p = filename.find(G_DIR_SEPARATOR,p+1);
  };
  if(!filename.empty()) filename.erase(0,1); // removing leading separator
  return true;
}

Here is the caller graph for this function:

static ARexJobFailure setfail ( JobReqResult  res) [static]

Variable Documentation

bool env_initialized = false [static]

Definition at line 39 of file job.cpp.

Glib::StaticMutex env_lock = GLIBMM_STATIC_MUTEX_INIT

Definition at line 40 of file job.cpp.