New submission from Matthew Tanous <mtanou...@gmail.com>:
Ran into this on macOS while trying to play around with the new posix_spawn bindings. It appears to me that the file_actions path is not what is being used by file_actions here. It may be that I am misunderstanding something, but I thought I would bring it up. Python 3.8.0a3 (v3.8.0a3:9a448855b5, Mar 25 2019, 17:05:20) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> file_actions = [(os.POSIX_SPAWN_OPEN, 1, '.tmp/temp_file', os.O_CREAT | >>> os.O_RDWR, 777)] >>> os.posix_spawnp('whoami', ['whoami'], file_actions=file_actions) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: posix_spawnp() takes exactly 3 positional arguments (2 given) >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=file_actions) Traceback (most recent call last): File "<stdin>", line 1, in <module> PermissionError: [Errno 13] Permission denied: 'whoami' ---------- components: Library (Lib) messages: 341518 nosy: Matthew Tanous priority: normal severity: normal status: open title: posix_spawnp returns error when used with file_actions type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36812> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com