X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fposixsignalwatcher.cpp;h=3db16359e284d16062d6270ed7d2c03a733462d3;hb=1f21c1f9613031ae263eeed0c4883bfcd5488343;hp=4da9539a5db467f1ae39c5e887491e9520d9e6ac;hpb=6eefdfc697067d184a589fc8a231b16316c09106;p=quassel.git diff --git a/src/common/posixsignalwatcher.cpp b/src/common/posixsignalwatcher.cpp index 4da9539a..3db16359 100644 --- a/src/common/posixsignalwatcher.cpp +++ b/src/common/posixsignalwatcher.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,10 +20,10 @@ #include "posixsignalwatcher.h" +#include #include -#include #include -#include +#include #include #include @@ -32,11 +32,9 @@ #include #include -#include "logmessage.h" - int PosixSignalWatcher::_sockpair[2]; -PosixSignalWatcher::PosixSignalWatcher(QObject *parent) +PosixSignalWatcher::PosixSignalWatcher(QObject* parent) : AbstractSignalWatcher{parent} { if (::socketpair(AF_UNIX, SOCK_STREAM, 0, _sockpair)) { @@ -54,7 +52,7 @@ PosixSignalWatcher::PosixSignalWatcher(QObject *parent) #ifdef HAVE_BACKTRACE // we only handle crashes ourselves if coredumps are disabled - struct rlimit *limit = (rlimit *)malloc(sizeof(struct rlimit)); + struct rlimit* limit = (rlimit*)malloc(sizeof(struct rlimit)); int rc = getrlimit(RLIMIT_CORE, limit); if (rc == -1 || !((long)limit->rlim_cur > 0 || limit->rlim_cur == RLIM_INFINITY)) { registerSignal(SIGABRT); @@ -88,7 +86,7 @@ void PosixSignalWatcher::onNotify(int sockfd) int signal; auto bytes = ::read(sockfd, &signal, sizeof(signal)); Q_UNUSED(bytes) - quInfo() << "Caught signal" << signal; + qInfo() << "Caught signal" << signal; switch (signal) { case SIGHUP: