diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-10-20 20:31:15 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-10-20 20:31:45 +0400 |
commit | 2a2417a5c343eb1a8486819454985311b844b127 (patch) | |
tree | a342f0faf50e242fb66182ea1749de5e343bdef2 /src/murmur | |
parent | be58259c78e0c678207af84a9b6f349a05d9cef7 (diff) |
If sighup when not detached, interpret as quit
Diffstat (limited to 'src/murmur')
-rw-r--r-- | src/murmur/UnixMurmur.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp index 5772ce72f..6f2294d9f 100644 --- a/src/murmur/UnixMurmur.cpp +++ b/src/murmur/UnixMurmur.cpp @@ -178,7 +178,12 @@ void UnixMurmur::handleSigHup() { ::read(iHupFd[1], &tmp, sizeof(tmp)); if (! qfLog || ! qfLog->isOpen()) { - qWarning("Caught SIGHUP, but logfile not in use"); + if (qfLog) { + qWarning("Caught SIGHUP, but logfile not in use -- interpreting as hint to quit"); + QCoreApplication::instance()->quit(); + } else { + qWarning("Caught SIGHUP, but logfile not in use"); + } } else { qWarning("Caught SIGHUP, will reopen %s", qPrintable(Meta::mp.qsLogfile)); qfLog->close(); |