Hi, thanks Jack for that, I've already seen this solution on the list, but I need to know when the pd subprocess ends and with a '&' i get a '0' on [shell] rightmost outlet when 'echo pid $1' command ends and not when pd ends moreover when killing Pd the external's destroy() method isn't called and this could block some hardware (like cameras...)
but maybe I was not clear enough since I have several questions in one thread... the problem was to exit all shell subprocess when quitting pd I solved it thanks to Cyrille by adding a watchdog the main pd send a "ping" each 100ms to all children, if there is no "ping" during 1 second, the child kill itself so the main pd can quit safely king regards antoine -- do it yourself http://antoine.villeret.free.fr 2013/5/28 Jack <[email protected]> > Le 28/05/2013 20:14, Antoine Villeret a écrit : > > hi, > > I'm calling a new instance of Pd inside a Pd patch with [shell] > but I notice I can't quit the main pd instance if a process is still > running inside the [shell] > > the GUI hangs until the process ends (until I quit Pd) > since the child pd is running without gui, > > 1) is it possible to exit a running process via [shell] ? > for example how could I send a ^c (ctrl+c) command ? > > 2) moreover, how to trig it when I press ctrl+Q or menu quit ? > > 3) the [noquit] abstraction gives me a tcl error : "can't rename > menu_quit command doesn't exists" > > I'm running pd vanilla 0.44-2 > > thanks for help > > antoine > > -- > do it yourself > http://antoine.villeret.free.fr > > > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > > Hello Antoine, > > With the message [pd & echo $!( to [shell], you should get the PID of the > subprocess. A [kill number_PID( to [shell] should kill this subprocess. > ++ > > Jack > > > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > >
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
