STINNER Victor <victor.stin...@haypocalc.com> added the comment:

This issue comes from sandbox, not from ctypes.

Using sandbox, execv() C function doesn't close files with FD_CLOEXEC flag if 
the child program is a static program.

test_ctypes hangs on find_library() in subprocess.Popen._execute_child():
 - create a pipe for the child exception (if any)
 - fork
 - the parent reads this pipe
 - the child calls exec()
 - exec() closes the pipe and the parent continues its work
 - etc.

find_library() runs "ldconfig -p" in a subprocess, and so everything hangs on 
"the parent reads this pipe" because "exec() closes the pipe and the parent 
continues its work" doesn't occur.

----------
Added file: http://bugs.python.org/file21767/sandbox_exec_bug.c

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11915>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to