Hi.
I'm testing gevent 1.0rc for my application. In this application I call
gevent.subprocess.call() and receive an exception like this:
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/cms-1.1.0pre-py2.7.egg/cms/service/Worker.py", line 105, in execute_job
> self.task_type.execute_job()
> File "/usr/local/lib/python2.7/dist-packages/cms-1.1.0pre-py2.7.egg/cms/grading/TaskType.py", line 250, in execute_job
> return self.compile()
> File "/usr/local/lib/python2.7/dist-packages/cms-1.1.0pre-py2.7.egg/cms/grading/tasktypes/Batch.py", line 141, in compile
> sandbox = create_sandbox(self)
> File "/usr/local/lib/python2.7/dist-packages/cms-1.1.0pre-py2.7.egg/cms/grading/TaskType.py", line 55, in create_sandbox
> sandbox = Sandbox(task_type.file_cacher)
> File "/usr/local/lib/python2.7/dist-packages/cms-1.1.0pre-py2.7.egg/cms/grading/Sandbox.py", line 219, in __init__
> ret = subprocess.call(box_cmd + ["--init"])
> File "/usr/local/lib/python2.7/dist-packages/gevent-1.0dev-py2.7-linux-x86_64.egg/gevent/subprocess.py", line 115, in call
> return Popen(*popenargs, **kwargs).wait()
> File "/usr/local/lib/python2.7/dist-packages/gevent-1.0dev-py2.7-linux-x86_64.egg/gevent/subprocess.py", line 235, in __init__
> errread, errwrite)
> File "/usr/local/lib/python2.7/dist-packages/gevent-1.0dev-py2.7-linux-x86_64.egg/gevent/subprocess.py", line 721, in _execute_child
> self._watcher = self._loop.child(self.pid)
> File "core.pyx", line 490, in gevent.core.loop.child (gevent/gevent.core.c:8044)
> File "core.pyx", line 1736, in gevent.core.child.__init__ (gevent/gevent.core.c:25823)
> TypeError: child watchers are only available on the default loop
I understand that this error comes from the underlying libev, but I
don't understand whether it is to be considered a gevent bug or if I'm
calling gevent.subprocess.call() the wrong way around. In this case,
please, could you tell me what's the proper way? I know close to nothing
about libev and gevent internals.
If instead this is a bug in gevent, I can file it as an issue con GitHub.
I could obtain this bug both with master and with 1.0rc2. Please let me
know if you need more information or tests (actually, the source code
I'm working on is public[1], but I doubt that you want to set it up to
investigate this report).
[1]
https://github.com/giomasce/cms/tree/gevent
Thanks for helping.
Giovanni.
--
Giovanni Mascellani <
masce...@poisson.phc.unipi.it>
Pisa, Italy
Web:
http://poisson.phc.unipi.it/~mascellani
Jabber:
g.masc...@jabber.org /
giov...@elabor.homelinux.org
--
Giovanni Mascellani <
masce...@poisson.phc.unipi.it>
Pisa, Italy
Web:
http://poisson.phc.unipi.it/~mascellani
Jabber:
g.masc...@jabber.org /
giov...@elabor.homelinux.org