Commit 65255164 authored by Pavel Vainerman's avatar Pavel Vainerman

cleanup code

parent e5d82bcb
...@@ -77,7 +77,6 @@ int main(int argc, const char** argv) ...@@ -77,7 +77,6 @@ int main(int argc, const char** argv)
dlogany << "(main): -------------- MBSlave START -------------------------\n\n"; dlogany << "(main): -------------- MBSlave START -------------------------\n\n";
act->run(false); act->run(false);
// on_sigchild(SIGTERM);
return 0; return 0;
} }
catch( const std::exception& e ) catch( const std::exception& e )
...@@ -91,7 +90,6 @@ int main(int argc, const char** argv) ...@@ -91,7 +90,6 @@ int main(int argc, const char** argv)
cerr << (p ? p.__cxa_exception_type()->name() : "null") << std::endl; cerr << (p ? p.__cxa_exception_type()->name() : "null") << std::endl;
} }
// on_sigchild(SIGTERM);
return 1; return 1;
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -58,7 +58,6 @@ int main( int argc, const char** argv ) ...@@ -58,7 +58,6 @@ int main( int argc, const char** argv )
dlogany << "(main): -------------- UDPReceiver START -------------------------\n\n"; dlogany << "(main): -------------- UDPReceiver START -------------------------\n\n";
act->run(false); act->run(false);
on_sigchild(SIGTERM);
} }
catch( const uniset::Exception& ex ) catch( const uniset::Exception& ex )
{ {
...@@ -69,6 +68,5 @@ int main( int argc, const char** argv ) ...@@ -69,6 +68,5 @@ int main( int argc, const char** argv )
dcrit << "(unetexchange): catch ..." << std::endl; dcrit << "(unetexchange): catch ..." << std::endl;
} }
on_sigchild(SIGTERM);
return 0; return 0;
} }
...@@ -223,6 +223,9 @@ void UniExchange::execute() ...@@ -223,6 +223,9 @@ void UniExchange::execute()
ptUpdate.reset(); ptUpdate.reset();
} }
if( cancelled )
break;
msleep(polltime); msleep(polltime);
} }
} }
......
#!/bin/sh #!/bin/sh
export LD_LIBRARY_PATH="../../lib/.libs;../lib/.libs"
ulimit -Sc 10000000000 ulimit -Sc 10000000000
./uniset2-start.sh -f ./uniset2-network --confile test.xml \ ./uniset2-start.sh -f ./uniset2-network --confile test.xml \
--smemory-id SharedMemory \ --smemory-id SharedMemory \
--unet-id UniExchange --unet-id UniExchange $*
../../Utilities/scripts/uniset2-stop.sh
\ No newline at end of file
../../conf/test.xml
\ No newline at end of file
...@@ -68,7 +68,7 @@ int main(int argc, const char** argv) ...@@ -68,7 +68,7 @@ int main(int argc, const char** argv)
act->broadcast( sm.transport_msg() ); act->broadcast( sm.transport_msg() );
act->run(true); act->run(true);
uex->execute(); uex->execute();
on_sigchild(SIGTERM); act->join();
return 0; return 0;
} }
catch( const std::exception& ex ) catch( const std::exception& ex )
...@@ -80,6 +80,5 @@ int main(int argc, const char** argv) ...@@ -80,6 +80,5 @@ int main(int argc, const char** argv)
dcrit << "(uninetwork): catch(...)" << endl; dcrit << "(uninetwork): catch(...)" << endl;
} }
on_sigchild(SIGTERM);
return 1; return 1;
} }
../../Utilities/scripts/uniset2-functions.sh
\ No newline at end of file
../../Utilities/scripts/uniset2-start.sh
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment