#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/format.hpp>
-#include "../Exception.hh"
-#include "../membind.hh"
-#include "../Backtrace.hh"
-#include "../signalnames.hh"
+#include <senf/Utils/Exception.hh>
+#include <senf/Utils/membind.hh>
+#include <senf/Utils/Backtrace.hh>
+#include <senf/Utils/signalnames.hh>
// #define __USE_GNU
#include <ucontext.h>
{
// int i (not unsigned) since argc_ is int ...
for (int i (1); i<argc_; ++i) {
- if (argv_[i] == std::string("--no-daemon"))
+ std::string argv (argv_[i]);
+ if (argv == "--no-daemon")
daemonize(false);
- else if (boost::starts_with(argv_[i], std::string("--console-log="))) {
- std::string arg (std::string(argv_[i]), 14u);
+ else if (boost::starts_with(argv, "--console-log=")) {
+ std::string arg (argv.substr(14u));
std::string::size_type komma (arg.find(','));
if (komma == std::string::npos) {
boost::trim(arg);
else if (! arg2.empty() ) consoleLog(arg2, StdErr);
}
}
- else if (boost::starts_with(argv_[i], std::string("--pid-file=")))
+ else if (boost::starts_with(argv, "--pid-file="))
pidFile(std::string(std::string(argv_[i]), 11u));
}
}
::sigaction(SIGFPE, &sa, NULL);
::sigaction(SIGBUS, &sa, NULL);
::sigaction(SIGSEGV, &sa, NULL);
+#ifdef SIGSTKFLT //SIGSTKFLT is used for stack faults on coprocessors. That condition doesn't exist on MIPS
::sigaction(SIGSTKFLT, &sa, NULL);
+#endif
::sigaction(SIGSYS, &sa, NULL);
::sigaction(SIGUSR2, &sa, NULL);
#endif