[PD] patch runs twice from script

patrice colet colet.patrice at free.fr
Fri Aug 28 13:44:45 CEST 2015


  I had same problem with using init.d script from svn,
this launches pd twice at bootup, --no-gui didn't change anything...
I resolved it by restarting from an howto page:

https://help.ubuntu.com/community/UbuntuBootupHowto

by the way thanks for the lock-file trick, I had once tried to launch 
several pd instances
on OSX maverick, it was only possible by removing lock-files, really 
annoying...

patko

Le 25/08/2015 23:00, IOhannes m zmölnig a écrit :
> On 08/25/2015 10:53 PM, Csaba Láng wrote:
>> Dear list,
>> is there a way to avoid that a patch which is run from a script either from
>> crontab or just autorun from the system runs twice?
>> I heard about --no-gui solution, but never managed to use it on Mac.
> i don't know how "--no-gui" is supposed to help you here.
> it only might obfuscate the fact that two instances are running...
>
>
> i can think of two simple ways to avoid double runs:
> - setup a shared-ressource (a lock-file): when the script starts it
> checks for the lock-file; if it is not there, it will create the lock,
> launch Pd; once Pd is finished it will remove the lock;
> if the lock *is* there, the script will exit immediately.
> see flock(1) on linux and shlock(1) on osx.
>
> - stop all running instances of the patch before starting it.
> usually you would just do something along the lines of `pkill -KILL pd`,
> before starting a new instance of Pd.
>
> fmasdr
> IOhannes
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150828/7413dfaf/attachment.html>


More information about the Pd-list mailing list