[vdr] New shutdown procedure not working as expected

Udo Richter udo_richter at gmx.de
Thu Aug 9 23:22:55 CEST 2007


Petri Helin wrote:
> Udo Richter wrote:
>> I *think* that these are kill signals received by the child process. 
>> Which is strange, as the child does an exit immediately. (Unless you're 
>> somewhere between 1.5.1 and 1.5.3 - this changed in 1.5.4)
>>
>> 6 is SIGABRT, 11 is SIGSEGV and 9 is SIGKILL.
> 
> I use version 1.5.6. I tested with my normal shutdown script and with a 
> script that just does an "exit 0". No difference there. Can the script 
> itself have any influence on the return value?

Since 1.5.4, VDR forks into a child that does nothing but fork off a 
second child, and do an exit(0). The second child exec's the shutdown 
script:

VDR
  +-- Child 1 -> exits
        +-- Child 2 -> runs shutdown

That way the waitpid quickly returns, the second child becomes orphaned, 
and no process ends up being a zombie.

Since the shutdown script runs orphaned, the return value of the script 
is not evaluated, nor does anyone wait for the script to terminate.

Cheers,

Udo



More information about the vdr mailing list