// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer NETwork research (NET)
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
namespace {
/* Purposely *not* derived from std::exception */
- struct DaemonFailureException {
- DaemonFailureException(unsigned c) : code(c) {}
+ struct DaemonExitException {
+ DaemonExitException(unsigned c) : code(c) {}
unsigned code;
};
}
-prefix_ void senf::Daemon::fail(unsigned code)
+prefix_ void senf::Daemon::exit(unsigned code)
{
- throw DaemonFailureException(code);
+ throw DaemonExitException(code);
}
prefix_ int senf::Daemon::start(int argc, char const ** argv)
main();
}
- catch (DaemonFailureException & e) {
- return e.code > 0 ? e.code : 1;
+ catch (DaemonExitException & e) {
+ return e.code;
}
#ifdef NDEBUG
std::string::size_type komma (arg.find(','));
if (komma == std::string::npos) {
boost::trim(arg);
- consoleLog(arg);
+ if (arg == std::string("none")) consoleLog("");
+ else if (!arg.empty()) consoleLog(arg);
} else {
std::string arg1 (arg,0,komma);
std::string arg2 (arg,komma+1);