Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Integration of Powersave in VDR



Sergei Haller wrote:
> 
> On Wed, 29 Aug 2001, Klaus Schmidinger wrote:
> >
> > Sergei Haller wrote:
> > >
> > > On Tue, 28 Aug 2001, Klaus Schmidinger wrote:
> > >
> > > > Since this is a user activity,
> > > > a new MinUserInactivity timeout will then be started.
> > > >
> > > > If this is what everybody can agree on, I can implement this framework into VDR.
> > > > All you'll have to do is provide the actual shutdown program and run VDR with the
> > > > new option "--shutdown=CMD", where CMD is the name of your program.
> > >
> > > what should be the default?
> > >   - `shutdown -h'? halt?
> > >     so the user could at least let the box automatically shutdown after
> > >     completing the record. or he would be able to use the new `intentional
> > >     shutdown' menu. I think one can disable the `automatical shutdown'
> > >     feature by setting the MinUserInactivity to 0
> > >
> > >   - something else?
> >
> > Your progra/script can do whatever it takes to shutdown the computer.
> > This is none of VDR's business. VDR will only call the program if there
> > is no recording currently going on, and it also won't exit immediately
> > after calling it, but rather wait for the SIGTERM that will be sent when
> > the computer shuts down. If anything should go wrong with the shutdown,
> > VDR will just continue to run (and try again after a while).
> 
> what I had in mind is: what will VDR do if no --shoutdown parameter is
> specified? just disable the intentional/automatical shutdown
> functionality?

I there is no '--shutdown' option, VDR has no way of knowing how to actually
shutdown the machine, so the shutdown feature will then be completely disabled.

> > > > An additional new menu option to intentionally shutdown the machine NOW will
> > > > complete this.
> > >
> > > One additional request:
> > >
> > > it would be nice if there was a way for some external program to tell vdr
> > > to `shutdown' machine now (to call that external command and so on)
> > >
> > > maybe via SVDRP ?
> >
> > An external program can "tell" that to VDR by sending it the SIGTERM signal.
> >
> > > (what I have in mind is the following: ATM I am using acpid to call
> > > `shutdown -h' on a power button press. with that new feature I would like
> > > to tell vdr to shutdown now)
> >
> > 'sutdown -h' will send a SIGTERM to any running process, and so VDR will exit.
> 
> Yeah. but (correct me if I'm wrong) on a SIGTERM vdr will exit regardless
> of any currently recording timers and regardless of any timmers which will
> start within the next MinEventTimeout minutes.
> 
> What I had in mind is a way to tell vdr the same as by calling the
> `intentionally shutdown NOW' menu item (i.e. letting the vdr the choice to
> call the actual shutdown script or not to call it)

Ah, I see. Well, this could be implemented by using the SIGHUP signal.
When the SIGHUP signal is received, VDR behaves as if the user requested
a shutdown. Of course we can also implement an SVDRP sommand for that.
I'll give it some thought.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index