Rewrite of shutdown handling; implemented cPlugin::WakeupTime(); SIGHUP forces reload; cThread::EmergencyExit() replaced by ShutdownHandler.RequestEmergencyExit()

This commit is contained in:
Klaus Schmidinger
2007-02-25 10:56:29 +01:00
parent 50b14be807
commit ddb7f33567
23 changed files with 770 additions and 189 deletions

11
menu.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 1.447 2007/01/07 14:19:48 kls Exp $
* $Id: menu.c 1.448 2007/02/25 09:51:53 kls Exp $
*/
#include "menu.h"
@@ -22,6 +22,7 @@
#include "plugin.h"
#include "recording.h"
#include "remote.h"
#include "shutdown.h"
#include "sources.h"
#include "status.h"
#include "themes.h"
@@ -2770,10 +2771,8 @@ void cMenuSetup::Set(void)
eOSState cMenuSetup::Restart(void)
{
if (Interface->Confirm(tr("Really restart?"))
&& (!cRecordControls::Active() || Interface->Confirm(tr("Recording - restart anyway?")))
&& !cPluginManager::Active(tr("restart anyway?"))) {
cThread::EmergencyExit(true);
if (Interface->Confirm(tr("Really restart?")) && ShutdownHandler.ConfirmRestart(true)) {
ShutdownHandler.Exit(1);
return osEnd;
}
return osContinue;
@@ -3699,7 +3698,7 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
if (device) {
dsyslog("switching device %d to channel %d", device->DeviceNumber() + 1, channel->Number());
if (!device->SwitchChannel(channel, false)) {
cThread::EmergencyExit(true);
ShutdownHandler.RequestEmergencyExit();
return false;
}
if (!Timer || Timer->Matches()) {