<div dir="ltr">Thanks Iohannes,<div><br><div>will give a try, but anyway it already happened not the first time to me.</div><div>Last time I had 3 identical mac minis with the same system image on each. 2 could run the script without problem, but the 3rd did not. The problem is especially with GEM, as in this case I have double lights turned on and everything is too bright.</div><div>Anyway, this should work automatically as the installation is permanent in a museum.</div><div>Will get back to you soon.</div><div><br></div><div>Popesz  </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 25, 2015 at 11:00 PM, IOhannes m zmölnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/25/2015 10:53 PM, Csaba Láng wrote:<br>
> Dear list,<br>
> is there a way to avoid that a patch which is run from a script either from<br>
> crontab or just autorun from the system runs twice?<br>
> I heard about --no-gui solution, but never managed to use it on Mac.<br>
<br>
</span>i don't know how "--no-gui" is supposed to help you here.<br>
it only might obfuscate the fact that two instances are running...<br>
<br>
<br>
i can think of two simple ways to avoid double runs:<br>
- setup a shared-ressource (a lock-file): when the script starts it<br>
checks for the lock-file; if it is not there, it will create the lock,<br>
launch Pd; once Pd is finished it will remove the lock;<br>
if the lock *is* there, the script will exit immediately.<br>
see flock(1) on linux and shlock(1) on osx.<br>
<br>
- stop all running instances of the patch before starting it.<br>
usually you would just do something along the lines of `pkill -KILL pd`,<br>
before starting a new instance of Pd.<br>
<br>
fmasdr<br>
<span class="HOEnZb"><font color="#888888">IOhannes<br>
<br>
</font></span><br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>