// Copyright (c) 2005-2007 Andre Merzky // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE file or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include /////////////////////////////////////////////////////////////////////////////// int main (int argc, char* argv[]) { int iter = 2; if ( argc > 1 ) { iter = ::atoi (argv[1]); } try { saga::job_service js; saga::job_self self = js.get_self (); std::string id = self.get_job_id (); // std::cout << "my job id: " << id << std::endl; int i = 0; while ( i++ < iter ) { // std::cout << "la la la" << std::endl; ::sleep (1); } // std::cout << "Uuuund Tschuess!" << std::endl; } catch ( saga::exception const & e ) { std::cerr << "saga exception caught: " << e.what () << std::endl; } return 0; }