On Fri, Sep 29, 2006 at 11:05:11PM +0200, Bert Freudenberg wrote:
Am 29.09.2006 um 22:21 schrieb Markus Gaelli:
On Sep 29, 2006, at 10:05 PM, Andreas Raab wrote:
Bert Freudenberg wrote:
Right now we're still using Python's dbus bindings, forwarding messages via a pipe into Squeak. This was the simplest to get working.
And also by far the safest bet since the Python bindings will be updated for sure so we only have to care about the part that we want to care about (how to get the messages from/to the image). Generally, my feeling is that for our needs (make eToys run robustly) this is all we should be doing - I don't see the need to write our own bindings if all we need is to exchanges a few messages back and forth.
Makes sense. But piping needs OS-Process, no? And OS-Process is not save/secure so it will have to go, no? If so, how will Squeak communicate with other processes?
Look at the implementation ;-)
No, I create a named pipe on the python side (mkfifo), hand that name as cmd line argument to the image, and open the pipe in Squeak using the AsyncFile plugin. The normal FilePlugin would block the whole VM, but AsyncFile works.
Bert,
I don't know the background of this discussion, but I'll mention that it would be possible to make a less-insecure, stripped-down version of a few OSProcess functions. For example, if you just need a way to run programs with popen() from Squeak such that you can read and write to a non-blocking pipe, that could be done with modest effort.
Depending on how strict the security concerns are, it might be necessary to move the primitives out of OSPP and into the FilePlugin. Aside from this it would be mainly a matter of stripping out all the junk you don't need from OSProcess and repackaging the remainder as e.g. "POpen".
I'd be happy to do this if (and only if) there is a real need for it.
Dave