uliss / pd-ceammc

Pure Data CEAMMC distribution (based on vanilla 0.53 by Miller Puckette)
Other
107 stars 6 forks source link

system.exec and pipe symbol #112

Closed 60-hz closed 2 years ago

60-hz commented 3 years ago

Right now, the pipe « | » symbol cannot be used with [system.exec]. It would be very useful to have this feature if possible.

uliss commented 3 years ago

May be it's too low level for Pd, but now [system.exec] is a wrapper around **exec*** functions:

https://man7.org/linux/man-pages/man3/exec.3.html

To be short, exec* functions run new processes not in the shell, as system function does. It allows to control executable process more precisely than with system. For example we can run top command, getting it's output to Pd.

Seems that we should have [system.shell] object that just runs given command in shell asynchronously and just get return code. Thus we can support pipes and other shell stuff.

Think we could do it in the next release

uliss commented 2 years ago

added separate issue: #152 , closing