[PD] communicating with the shell

Rob Canning robcanning at eircom.net
Wed Jan 28 15:26:13 CET 2009


hello,

if have recently working on replacing the [shell] object (ggee) from my 
patches as it is leaving zombies all over the place - i believe this is 
a know issue? (2002) http://markmail.org/message/wrlpbaal75viugft

(it would be really nice to have an object for communicating with the 
shell that is not buggy.)

so here is my workaround:

in a shell start up pdreceive and pipe the output into shell:

pdreceive 3003 udp| sh

send my messages from [netsend 1]

problem: pd sticks a ; onto the end of all messages

solution: pipe the message through sed on its way to pdreceive

pdreceive 3003 udp |sed 's/;//'|sh

ok now so now this is fine for things that do there job and then finish 
such as ls cat etc. but what about things that need to stay running?
for example when i want to open emacs then run another command the 
second command wont be run until emacs is closed.

i thought adding a & at the end would work but it doesnt

pdreceive 3003 udp |sed 's/;/&/'|sh

can someone tell me what i am doing wrong?

also this method is fine for sending stuff to the shell but what about 
getting results back from the shell? like a bang when the process is 
finsihed or the result of a pwd command?
i thought about pipeing | the output of the shell into a pdsend on 
another port but that seems messy?

anyone got solutions to these issues? or anyone with the skills agree 
that [shell] should be fixed or rewritten and included in another lib?

many thanks

rob canning











More information about the Pd-list mailing list