1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

If a shutdown is requested, but the shutdown script doesn't actually halt the system, it is now tried again after 5 minutes

This commit is contained in:
Klaus Schmidinger 2006-01-29 14:37:43 +01:00
parent 6078b31aab
commit 07ba731503
3 changed files with 6 additions and 2 deletions

View File

@ -546,6 +546,7 @@ Helmut Auer <vdr@helmutauer.de>
for suggesting to increase the default value for 'Min. user inactivity' to 300 minutes for suggesting to increase the default value for 'Min. user inactivity' to 300 minutes
for suggesting to add cChannel::LinkChannels() and cChannel::RefChannel() for suggesting to add cChannel::LinkChannels() and cChannel::RefChannel()
for suggesting to give a message when an instant recording is started for suggesting to give a message when an instant recording is started
fpr suggesting to retry a shutdown after a while
Jeremy Hall <jhall@UU.NET> Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c for fixing an incomplete initialization of the filter parameters in eit.c

View File

@ -4266,3 +4266,5 @@ Video Disk Recorder Revision History
always taken into account. always taken into account.
- Now initializing the channels' schedule pointers when reading the epg.data file, - Now initializing the channels' schedule pointers when reading the epg.data file,
so that the first WhatsOn menu will come up faster. so that the first WhatsOn menu will come up faster.
- If a shutdown is requested, but the shutdown script doesn't actually halt the
system, it is now tried again after 5 minutes (suggested by Helmut Auer).

5
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/vdr * The project's page is at http://www.cadsoft.de/vdr
* *
* $Id: vdr.c 1.245 2006/01/28 14:38:30 kls Exp $ * $Id: vdr.c 1.246 2006/01/29 14:35:31 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -71,6 +71,7 @@
// in order to react on a possible new CAM menu as soon as possible // in order to react on a possible new CAM menu as soon as possible
#define DEVICEREADYTIMEOUT 30 // seconds to wait until all devices are ready #define DEVICEREADYTIMEOUT 30 // seconds to wait until all devices are ready
#define MENUTIMEOUT 120 // seconds of user inactivity after which an OSD display is closed #define MENUTIMEOUT 120 // seconds of user inactivity after which an OSD display is closed
#define SHUTDOWNRETRY 300 // seconds before trying again to shut down
#define EXIT(v) { ExitCode = (v); goto Exit; } #define EXIT(v) { ExitCode = (v); goto Exit; }
@ -1087,7 +1088,7 @@ int main(int argc, char *argv[])
if (signal(SIGALRM, Watchdog) == SIG_IGN) if (signal(SIGALRM, Watchdog) == SIG_IGN)
signal(SIGALRM, SIG_IGN); signal(SIGALRM, SIG_IGN);
} }
LastActivity = time(NULL); // don't try again too soon LastActivity = time(NULL) - Setup.MinUserInactivity * 60 + SHUTDOWNRETRY; // try again later
UserShutdown = false; UserShutdown = false;
continue; // skip the rest of the housekeeping for now continue; // skip the rest of the housekeeping for now
} }