00001
00002
00003
00004
00005
00006
00007 #include <iostream>
00008 #include <cstdlib>
00009 #include "ComPlusPlus/ComPlusPlus"
00010
00011 #include <string>
00012
00013 int main (int argc, char *argv [] ) {
00014 try {
00015
00016 compp::Launch *C1 = new compp::Launch ( "/bin/ls -l" ) ;
00017
00018 if ( C1 == NULL ) {
00019 std::cout << "Spawn == NULL\n";
00020 }
00021 std::cout << "SPAWNING1\n";
00022 C1->Spawn();
00023
00024 for ( int i = 0; i < 20; ++i ) {
00025 syspp::Call::Sleep(1);
00026 std::cout << "**Parent \n";
00027 }
00028 delete C1;
00029
00030 } catch ( syspp::ComException &e ) {
00031 std::cout << "Exception " << e.what() << "\n" ;
00032
00033 } catch ( ... ) {
00034 std::cout << "Gen Exception\n" ;
00035 }
00036
00037 return 0;
00038 }