[Twisted-Python] Using twisted to manage processes

Jean-Paul Calderone exarkun at divmod.com
Wed Jun 4 19:29:15 EDT 2008


On Wed, 4 Jun 2008 10:27:48 -0600, Brian Granger <ellisonbg.net at gmail.com> wrote:
>Hi,
>
>We have been using Twisted for a long time with IPython and we are
>needing a nice general and cross platform way of managing processes
>(spawning, sending signals, etc.).  I am aware of Twisted's process
>management API and it looks like it would fit the bill rather well for
>us.  But, I am wondering how cross platform it is.  We need to be able
>to write code that works on Linux, OS X, AIX and Win32.  More
>specifically, I know 0 about process control on Win32 and want to make
>sure that Windows users will be able to use this stuff.  So, will the
>process management stuff work on Win32?  Are there any issues I need
>to be aware of on Win32 that the Twisted API won't quite handle?

Twisted supports processes on Windows.  Not all of the arguments to
spawnProcess are supported, such as the arbitrary file descriptor
option, but for basic process management it works alright.  It's not
as efficient on Windows as on POSIX, but it also doesn't suffer the
SIGCHLD issues POSIX suffers from. :)

As long as you're a bit careful and test your code on Windows, you
should do alright.

Processes on OS X work almost as well as they do on Linux.  I believe
there is still a problem with PTYs, most likely due to a kernel bug.
It is, however, quite rare.  Linux doesn't really have any known issues.
I've never tested on AIX, and AIX isn't a "supported" platform - meaning
we have no buildslave for it, and regular testing of any kind is not
done on it.  It may work, or it may not.  If you can supply a buildslave,
we can try to make it a supported platform.

Jean-Paul




More information about the Twisted-Python mailing list