[Twisted-web] spawning a xvfb and firefox with a timeout

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Aug 20 17:01:10 EDT 2011


On 19 Aug, 04:42 am, schenette at gmail.com wrote:
>I'm attempting to spawn xvfb with firefox using twisted's spawnProcess.
>
>I'm having two issues:
>
>1) when I call a normal process (not xvfb) it seems to
>work, but when I call xvfb the process goes defunct
>
>2) perhaps because it goes defunct but the timeout I set in place in
>the processprotocol does
>not trigger.
>
>==============
>here is the code for spawning a process
>==============
>108         command = ["/usr/bin/xvfb-run", "--auto-servernum",
>"/usr/bin/firefox", "-P", profile_id]
>109         subprocess = reactor.spawnProcess(TimedProcessProtocol(20),
>110                                             command[0], command)


Does it make any difference if you pass on the parent's environment to 
the xvfb-run process?  Try something like spawnProcess(..., 
env=os.environ)

Jean-Paul



More information about the Twisted-web mailing list