Back to index

nordugrid-arc-nox  1.1.0~rc6
Functions
test_run.cpp File Reference
#include "Logger.h"
#include "Run.h"
#include "Thread.h"
#include <string>
#include <iostream>
#include <glibmm.h>
#include <unistd.h>
#include <signal.h>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 100 of file test_run.cpp.

               {
  signal(SIGTTOU, SIG_IGN);
  std::string out;
  Arc::Run run("/bin/cat /tmp/*");
  run.AssignStdout(out);
  run.KeepStderr(true);
  run.KeepStdin(true);
  sleep(10);
  run.Start();
  if (run.Wait()) {
    std::cerr << "Success" << std::endl;
    std::cout << out << std::endl;
  }
  else
    std::cerr << "Timeout" << std::endl;
  sleep(600);
  return 0;
}

Here is the call graph for this function: