Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ src/Fragmentation/Automation/Makefile.am	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -160,4 +160,5 @@
   $(BOOST_ASIO_LIBS) \
   $(BOOST_SERIALIZATION_LIBS) \
+  $(BOOST_PROGRAM_OPTIONS_LIBS) \
   $(BOOST_THREAD_LIBS) \
   $(BOOST_SYSTEM_LIBS) \
Index: src/Fragmentation/Automation/poolworker.cpp
===================================================================
--- src/Fragmentation/Automation/poolworker.cpp	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ src/Fragmentation/Automation/poolworker.cpp	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -28,6 +28,8 @@
 
 #include <iostream>
+#include <boost/program_options.hpp>
 #include <boost/lexical_cast.hpp>
 #include <signal.h>
+#include <vector>
 
 #include "atexit.hpp"
@@ -36,11 +38,19 @@
 #include "Pool/PoolWorker.hpp"
 
+//!> global shutdown function
 boost::function<void (int)> shutdownfunction;
+//!> global signal vector for later releasing
+std::vector<size_t> signals;
 
 void signalhandler(int sig)
 {
+  // shutdown if we have handler
   if (shutdownfunction)
     shutdownfunction(sig);
-  signal(SIGINT, NULL);
+
+  // release signal hook again
+  for (std::vector<size_t>::const_iterator iter = signals.begin();
+      iter != signals.end(); ++iter)
+    signal(*iter, NULL);
 }
 
@@ -51,24 +61,91 @@
   atexit(cleanUp);
 
-  setVerbosity(3);
+  // Declare the supported options.
+  boost::program_options::options_description desc("Allowed options");
+  desc.add_options()
+      ("help,h", "produce help message")
+      ("verbosity,v", boost::program_options::value<size_t>(), "set verbosity level")
+      ("signal", boost::program_options::value< std::vector<size_t> >(), "set signal to catch (can be given multiple times)")
+      ("server", boost::program_options::value< std::string>(), "connect to server at this address (host:port)")
+      ("listen", boost::program_options::value< std::string >(), "listen on this port")
+      ("hostname", boost::program_options::value< std::string>(), "name of host on which this codes runs and which server can resolve")
+  ;
+
+  boost::program_options::variables_map vm;
+  boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
+  boost::program_options::notify(vm);
+
+  if (vm.count("help")) {
+    std::cout << desc << "\n";
+    return 1;
+  }
+
+  if (vm.count("verbosity")) {
+    LOG(0, "STATUS: Verbosity level was set to " << vm["verbosity"].as<size_t>() << ".");
+    setVerbosity(vm["verbosity"].as<size_t>());
+  } else {
+    LOG(0, "STATUS: Verbosity level was not set, defaulting to 5.");
+    setVerbosity(5);
+  }
+
+  std::string server;
+  std::string serverport;
+  if (vm.count("server")) {
+    server = vm["server"].as< std::string >();
+    serverport = server.substr(server.find_last_of(':')+1, std::string::npos);
+    server = server.substr(0, server.find_last_of(':'));
+    try {
+      boost::lexical_cast<size_t>(serverport);
+    } catch (boost::bad_lexical_cast) {
+      ELOG(1, "Could not interpret " << serverport << " as server:port.");
+      return 255;
+    }
+    LOG(1, "INFO: Using " << server << ":" << serverport << " as server's address.");
+  } else {
+    ELOG(1, "Requiring server's address (host:port) to connect to.");
+    return 255;
+  }
+
+  std::string hostname("localhost");
+  if (vm.count("hostname")) {
+    hostname = vm["hostname"].as< std::string >();
+    LOG(1, "INFO: Using " << hostname << " as host's name.");
+  } else {
+    ELOG(1, "Requiring port to listen on .");
+    return 255;
+  }
+
+  std::string listenport;
+  if (vm.count("listen")) {
+    try {
+      listenport = vm["listen"].as< std::string >();
+    } catch (boost::bad_lexical_cast) {
+      ELOG(1, "Could not read " << vm["listen"].as< std::string >() << " as digits.");
+      return 255;
+    }
+    LOG(1, "INFO: Using port " << listenport << " to listen to server connects.");
+  } else {
+    ELOG(1, "Requiring port to listen on .");
+    return 255;
+  }
 
   size_t exitflag = 0;
   try
   {
-    // Check command line arguments.
-    if (argc != 5)
-    {
-      std::cerr << "Usage: " << argv[0] << " <host> <port> <listenhost> <listenport>" << std::endl;
-      return 1;
-    }
-
     boost::asio::io_service io_service;
-    PoolWorker client(io_service, argv[1], argv[2], argv[3], argv[4]);
+    PoolWorker client(io_service, server, serverport, hostname, listenport);
 
     // catch ctrl-c and shutdown worker properly
     shutdownfunction = boost::bind(&PoolWorker::shutdown, boost::ref(client), _1);
-//    signal(SIGABRT, &signalhandler);
-//    signal(SIGTERM, &signalhandler);
-    signal(SIGINT, &signalhandler);
+    if (vm.count("signal")) {
+      signals =  vm["signal"].as< std::vector<size_t> >();
+      for (std::vector<size_t>::const_iterator iter = signals.begin();
+          iter != signals.end(); ++iter) {
+        LOG(0, "STATUS: Catching signal " << *iter << " via signal handler.");
+        signal(*iter, &signalhandler);
+      }
+    } else {
+      LOG(0, "STATUS: No signals are caught.");
+    }
 
     // process io requests
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -19,5 +19,5 @@
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -27,5 +27,5 @@
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-enrollinpool.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-enrollinpool.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-enrollinpool.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -13,11 +13,14 @@
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
 
+# check help of poolworker
+AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -h], 1, [ignore], [ignore], [kill $server_pid])
+
 # let worker enroll in pool
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
 
-# send kill signal to worker such that it shuts down
-AT_CHECK([kill -INT $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+# send kill signal to worker such that it shuts down properly
+AT_CHECK([kill -2 $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 
 # shutdown server as well
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-mpqc-jobs.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-mpqc-jobs.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-mpqc-jobs.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -28,5 +28,5 @@
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 5], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-resubmitjobs.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-resubmitjobs.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-resubmitjobs.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -19,5 +19,5 @@
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT 2>workererr &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT 2>workererr &
 worker_pid=$!
 AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at	(revision dc759cf0dae2560ef8d66043ed7c98f2c23561aa)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at	(revision 5ac92ec01c987087e2a3329a233da101edaa2998)
@@ -18,5 +18,5 @@
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
+${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
