[PD] how to kill all [shell]'s child before quitting Pd
antoine.villeret at gmail.com
Wed May 29 14:41:02 CEST 2013
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
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
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
do it yourself
2013/5/28 Jack <jack at rybn.org>
> Le 28/05/2013 20:14, Antoine Villeret a écrit :
> 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
> do it yourself
> _______________________________________________Pd-list at iem.at 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.
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list