mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Rewrite of shutdown handling; implemented cPlugin::WakeupTime(); SIGHUP forces reload; cThread::EmergencyExit() replaced by ShutdownHandler.RequestEmergencyExit()
This commit is contained in:
47
INSTALL
47
INSTALL
@@ -160,30 +160,33 @@ and the next timer event is at least MinEventTimeout minutes in the future
|
||||
(see the Setup parameters in MANUAL).
|
||||
|
||||
The command given in the '-s' option will be called with five parameters.
|
||||
The first one is the time (in UTC) of the next timer event (as a time_t
|
||||
type number), and the second one is the number of seconds from the current
|
||||
time until the next timer event. Your program can choose which one to use
|
||||
for programming some sort of hardware device that makes sure the computer
|
||||
will be restarted in time before the next timer event. Your program must
|
||||
also initiate the actual shutdown procedure of the computer. After this
|
||||
your program should return to VDR. VDR will not automatically exit after
|
||||
calling the shutdown program, but will rather continue normally until it
|
||||
receives a SIGTERM when the computer is actually shut down. So in case
|
||||
the shutdown fails, or the shutdown program for some reason decides not to
|
||||
perform a shutdown, VDR will stay up and running and will call the shutdown
|
||||
program again after another five minutes.
|
||||
|
||||
If there are currently no timers active, both parameters will be '0'.
|
||||
In that case the program shall not set the hardware for automatic restart
|
||||
and only perform the system shutdown. A program that uses the second parameter
|
||||
to set the hardware for restart must therefore also check whether the first
|
||||
parameter is '0'.
|
||||
The first one is the time (in UTC) of the next timer event or plugin wakeup
|
||||
time (as a time_t type number), and the second one is the number of
|
||||
seconds from the current time until the next timer event. Your program can
|
||||
choose which one to use for programming some sort of hardware device that
|
||||
makes sure the computer will be restarted in time before the next timer
|
||||
event. Your program must also initiate the actual shutdown procedure of the
|
||||
computer. VDR will not automatically exit after calling the shutdown
|
||||
program, but will rather continue normally until it receives a SIGTERM when
|
||||
the computer is actually shut down. So in case the shutdown fails, or the
|
||||
shutdown program for some reason decides not to perform a shutdown, VDR
|
||||
will stay up and running and will call the shutdown program again after a
|
||||
while. The command will be started in a separate background session, so it
|
||||
can continue to run even after VDR has terminated.
|
||||
|
||||
The third parameter contains the number of the channel that will be recorded
|
||||
by the next timer (or 0 if no timer is present), and the fourth parameter
|
||||
contains the file name of the recording as defined in the timer (or an empty
|
||||
string if no timer is present). These can be used by the shutdown program to
|
||||
show that information on some display interface etc.
|
||||
If there are currently no timers active and there is no plugin wakeup
|
||||
time, both parameters will be '0'. In that case the program shall not set
|
||||
the hardware for automatic restart and only perform the system shutdown.
|
||||
A program that uses the second parameter to set the hardware for restart
|
||||
must therefore also check whether the first parameter is '0'.
|
||||
|
||||
If the wakeup time is given by a timer, the third parameter will be the
|
||||
number of the channel that will be recorded, otherwise it will be 0. The
|
||||
fourth parameter contains the file name of the recording as defined in the
|
||||
timer, the name of the plugin that requested the wakeup time, or an empty
|
||||
string if no wakeup time is present. These can be used by the shutdown
|
||||
program to show that information on some display interface etc.
|
||||
|
||||
The fifth parameter indicates the reason why the shutdown was requested.
|
||||
'0' means this is an automatic shutdown due to some timeout, while '1' means
|
||||
|
Reference in New Issue
Block a user