[vdr] New shutdown procedure not working as expected
Petri Helin
phelin at googlemail.com
Tue Aug 7 21:27:48 CEST 2007
Udo Richter wrote:
> Petri Helin wrote:
>> I traced the problem to the SystemExec call in
>> cShutdownHandler::CallShutdownCommand where Setup.NextWakeupTime is
>> updated only if the SystemExec call returns 0. i changed it to accept
>> all values greater or equal to 0 and now Setup.NextWakeupTime gets
>> updated properly. Can some explain me why 0 is expected?
>
> SystemExec called with true as second parameter should only return -1 in
> case of an error (logged to syslog) or the status of waitpid() in case
> of success. (see thread.c) Since the direct child instantly does
> exit(0), I assumed that status should also be 0.
>
> On the other hand, the man page of waitpid mentions lots of macros to
> inspect the status return of waitpid. Maybe checking on these helps here.
>
It seems to me that VDR still fails writing the NextWakeupTime every now
and then, even after I made the change described earlier. Do you have
suggestions on how to shutdown properly in order to get the
NextWakeupTime written to setup.conf? I run VDR as a daemon and shut it
down in shutdown script by calling start-stop-daemon (I use Ubuntu Feisty).
-Petri
More information about the vdr
mailing list