On Saturday 07 February 2009, Udo Richter wrote: > On 07.02.2009 11:26, Ville Skyttä wrote: > >> VDR does not know whether the shutdown script initiated the shutdown or > >> decided to ignore it, > > > > I suppose it would be quite easy to implement that and maybe some other > > scenarios as well using shutdown script exit statuses. For example exit > > status 0 = shutdown successfully initiated (already in current VDR), 10 = > > shutdown ignored, 11 = something else, 12 = something else, anything else > > = an unexpected error occurred. > > Unfortunately it's not that easy. Currently, VDR backgrounds the call to > the shutdown script, and detaches the shutdown script from the VDR > process. Only because of that, the script can 'survive' the kill of VDR, Why is that even necessary? Shutdown scripts could selectively background+detach things that need to survive killing of VDR and the script themselves, if any. > and only because of that the script can display messages via SVDRP. Hmm, why wouldn't a non-background, non-detached script called by VDR be able to do that? > Some shutdown scripts do set > error levels, but there's no common definition about the meaning of > error levels. Right, my post was about mentioning a possibility to add such common definitions if found feasible. > Defining error levels for the shutdown script would > thereby be potentially incompatible to existing scripts. Sure. Authors of such scripts get to keep both pieces if their scripts break due to use of undocumented features ;). I suppose changing the shutdown script not to run background+detached would probably be a source of more incompatibilities though, and ones that script authors would not be responsible for. _______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr