Running Perl script from VDR via commands.conf ?

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

 



I didn't know about "setsid".
Thanks fot the tips !


Hi,

Dieter Fauth wrote:
> Hi,
> you can use:
> echo "command" | at now
> 
> example:
> Lautst?rke korrigieren?: echo "/usr/lib/vdr/svdrpsend.pl VOLU 255" | 
> at now

there are a lot of tools out there which are using this way (vdrconvert
uses it to a wide extend) but I think this is an suboptimal solution. I
would suggested a different solution here:

Lautst?rke korrigieren?: setsid /usr/lib/vdr/svdrpsend.pl VOLU 255 >
/dev/null 2>&1 &

This solution uses setsid to detach the spawned process. This nice
little tool is include in util-linux (priority required) on debian based
systems and should also be available on a wide range of other
distribution.

Setsid simply makes a system call to detach the process. No additional
daemons are needed and the call is executed immediately in the same
context (both is different using atd).

> 
> 
> On Sun, 28 May 2006 22:10:14 +0200, karim <kafifi@xxxxxxxxxx> wrote:
> 
>> Hello,
>>
>> I am trying to run a Perl script from VDR menu,
>> but it sticks VDR after one second : "timeout".
>>
>> I've added this line in VDR's commands.conf :
>>
>> MY_SCRIPT:  /usr/local/bin/myscript.pl &   
>>
>> How could I launch the Perl script in background mode ?
>>
>> Thanks.
>>
>>
>>
>> _______________________________________________
>> vdr mailing list
>> vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux