Kamaelia docs : Kamaelia.File.UnixProcess
UnixProcess
Launch another unix process and communicate with it via its standard input and
output, by using the "inbox" and "outbox" of this component.
The purpose behind this component is to allow the following to occur:
Pipeline(
dataSource(),
UnixProcess("command", *args),
dataSink(),
).run()
More specificaly, the longer term interface of this component will be:
UnixProcess:
- inbox - data recieved here is sent to the program's stdin
- outbox - data sent here is from the program's stdout
- control - at some point we'll define a mechanism for describing
control messages - these will largely map to SIG* messages
though. We also need to signal how we close our writing pipe.
This can happen using the normal producerFinished message.
- signal - this will be caused by things like SIGPIPE messages. What
this will look like is yet to be defined. (Let's see what works
first.
This code is only really tested on Linux.
Initially this will be python 2.4 only, but it would be nice to support
older versions of python (eg 2.2.2 - for Nokia mobiles).
For the moment I'm going to send STDERR to dev null, however things won't
stay that way.
- control : We receive shutdown messages here
- stdinready : We're notified here when we can write to the sub-process
- inbox : Strings containing data to send to the sub process
- stderrready : We're notified here when we can read errors from the sub-process
- stdoutready : We're notified here when we can read from the sub-process
- outbox : data from the sub command is output here
- signal : not used
- selectorsignal : To send control messages to the selector
- selector : We send messages to the selector here, requesting it tell us when file handles can be read from/written to
Feedback
Got a problem with the documentation? Something unclear that could be clearer?
Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!
Please leave you feedback
here
in reply to the documentation thread in the Kamaelia blog.
-- Automatic documentation generator, 19 Oct 2008 at 14:29:09 UTC/GMT
This is a page from the Kamaelia website. You can find the original here: