[Twisted-Python] Interrupted system call in Twisted.Web...
Christopher Armstrong
radix at twistedmatrix.com
Sun May 18 21:09:20 MDT 2003
On 2003.05.18 23:03, Stuart Hungerford wrote:
> Hi all,
>
> My application is happily using Twisted.Web for a web interface to
> a set of resources. At one point I'm doing an os.popen2() call to
> find some details on a particular resource. For now at least using
> the popen2() call is the only way I can get this information.
>
> Occasionally I'm getting an "Interrupted system call" Python
> exception from this call. I'd guess that os.popen2() is not
> especially friendly to an asynchronous processing model like that
> used in Twisted?
>
> Could someone point me toward a more Twisted-aware approach than
> using os.popen2()?
Yeah, you should be using `reactor.spawnProcess'. There's also some
utilities in twisted.internet.util for getting the output of a command
in a Deferred.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://twistedmatrix.com/users/radix.twistd/
More information about the Twisted-Python
mailing list