Xavier de Gaye added the comment: On android dup2() returns with an error when both fds are the same:
root@generic_x86:/data/local/tmp # python Python 3.6.0a0 (default:811ccdee6f87+, May 7 2016, 12:44:06) [GCC 4.9 20140827 (prerelease)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.dup2(1, 1) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument The attached patch fixes this in test_urandom_fd_reopened. ---------- keywords: +patch Added file: http://bugs.python.org/file42768/test_urandom_fd_reopened.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26935> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com