Back to index

nordugrid-arc-nox  1.1.0~rc6
run_redirected.h
Go to the documentation of this file.
00001 #ifndef GRID_MANAGER_RUN_REDIRECTED_H
00002 #define GRID_MANAGER_RUN_REDIRECTED_H
00003 
00004 #include <arc/Run.h>
00005 
00006 #include "../jobs/users.h"
00007 #include "../jobs/states.h"
00008 #include "run_plugin.h"
00009 
00010 class RunRedirected {
00011  private:
00012   RunRedirected(JobUser& user,const char* cmdname,int in,int out,int err):user_(user),cmdname_(cmdname?cmdname:""),stdin_(in),stdout_(out),stderr_(err) { };
00013   ~RunRedirected(void) { };
00014   JobUser& user_;
00015   std::string cmdname_;
00016   int stdin_;
00017   int stdout_;
00018   int stderr_;
00019   static void initializer(void* arg);
00020  public:
00021   operator bool(void) { return true; };
00022   bool operator!(void) { return false; };
00023   static int run(JobUser& user,const char* cmdname,int in,int out,int err,char *const args[],int timeout);
00024   static int run(JobUser& user,const char* cmdname,int in,int out,int err,const char* cmd,int timeoutd);
00025 };
00026 
00027 #endif