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.
Thanks for any help:
Popesz
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:
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.
usually you would just do something along the lines of pkill -KILL pd
,
before starting a new instance of Pd.
fmasdr IOhannes
Thanks Iohannes,
will give a try, but anyway it already happened not the first time to me. 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. Anyway, this should work automatically as the installation is permanent in a museum. Will get back to you soon.
Popesz
On Tue, Aug 25, 2015 at 11:00 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
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@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
your problem must come from the "application saved state" ie Resume. see: http://puredata.info/docs/faq/help-pd-crashes-on-startup-on-mac-osx-10-7 http://osxdaily.com/2011/07/31/disable-resume-specific-applications-mac-os-x... n
Le 26/08/2015 11:14, Csaba Láng a écrit :
Thanks Iohannes,
will give a try, but anyway it already happened not the first time to me. 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. Anyway, this should work automatically as the installation is permanent in a museum. Will get back to you soon.
Popesz
On Tue, Aug 25, 2015 at 11:00 PM, IOhannes m zmölnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote:
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@lists.iem.at <mailto:Pd-list@lists.iem.at> mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Nicolas,
sounds reasonable, I give a try today. Thanks for the hint!
Popesz
On Wed, Aug 26, 2015 at 12:51 PM, Nicolas Montgermont < nicolas_montgermont@yahoo.fr> wrote:
your problem must come from the "application saved state" ie Resume. see: http://puredata.info/docs/faq/help-pd-crashes-on-startup-on-mac-osx-10-7
http://osxdaily.com/2011/07/31/disable-resume-specific-applications-mac-os-x... n
Le 26/08/2015 11:14, Csaba Láng a écrit :
Thanks Iohannes,
will give a try, but anyway it already happened not the first time to me. 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. Anyway, this should work automatically as the installation is permanent in a museum. Will get back to you soon.
Popesz
On Tue, Aug 25, 2015 at 11:00 PM, IOhannes m zmölnig < zmoelnig@iem.at zmoelnig@iem.at> wrote:
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@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list http://lists.puredata.info/listinfo/pd-list
_______________________________________________Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I think the problem of Lang is different, he says: "The problem is especially with GEM, as in this case I have double lights turned on and everything is too bright." It is more a problem of the patch launching twice in the same pd instance, specific to OSX 10.7+ (IIRC)
Under osX, to launch two pd instances you just have to start them from terminal. Nicolas
Le 28/08/2015 13:44, patrice colet a écrit :
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@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 28/08/2015 14:30, Nicolas Montgermont a écrit :
I think the problem of Lang is different, he says: "The problem is especially with GEM, as in this case I have double lights turned on and everything is too bright." It is more a problem of the patch launching twice in the same pd instance, specific to OSX 10.7+ (IIRC)
yes I've seen this after the mail was sent...
Under osX, to launch two pd instances you just have to start them from terminal. Nicolas
not under maverick...
Le 28/08/2015 13:44, patrice colet a écrit :
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@lists.iem.at mailing list UNSUBSCRIBE and account-management ->http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 28/08/2015 14:37, patrice colet a écrit :
Under osX, to launch two pd instances you just have to start them from terminal.
not under maverick...
I am under mavericks (10.9.5) and it works. you just have to do for example: /Applications/Pd-0.46-5.app/Contents/MacOS/Pd twice. (Put a & after the first or open two terminals) n