Hi Marco,
I read the source code of this external* and it works with a fork. It means that we have a parent process, your first PD instance, and a child process, the shell that created your second PD instance. AFAIK it is not possible to kill the parent process and keep the child running. The child is the shell and your second PD instance depends on this process to run. It's possible to run a child without a parent but [shell] should use a nohup or something like that. Since this external doesn't seem to have it implemented, I don't think that it will be possible.
Schiavoni
P.S.: Reading the source code I discovered that this object accept a bang message that prints "bang". It also has an unused static variable "shell_pid"...
http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/ggee/c...
Hi all,
I'm having some troubles with two pd instances and [shell].
I launch a patch with the first Pd instance from the terminal. Here, i use [shell] to create a new patch and open it with a second Pd instance.
when the new patch is loaded, it sends a [quit( message to [noquit] to the first pd-instance patch, via OSC, in order to kill it.
everything works fine until the first instance receive the OSC message. At this point, the pd process is killed but the GUI freezes on the screen, and the terminal freezes too.
If I launch the first Pd instance from the terminal with '&', and then run the script through the same terminal, it works fine.
this below is the script. nothing fancy.
any idea why the process doesn't work?
thanksss!
\\\\\\\\\\\\\\\ #!/bin/bash
NEWPATCH=$1 cp /usr/share/Xth-Sense/Xth-Sense.pd $HOME/Desktop/$NEWPATCH.pd; sleep 2; pdextended -alsa $HOME/Desktop/$NEWPATCH.pd; exit \\\\\\\\\
-- Marco Donnarumma New Media + Sonic Arts Practitioner, Performer, Teacher, Director. Embodied Audio-Visual Interaction Research Team. Department of Computing, Goldsmiths University of London
Portfolio: http://marcodonnarumma.com Research: http://res.marcodonnarumma.com Director: http://www.liveperformersmeeting.net