2013/7/24 Richard Oudkerk <shibturn at gmail.com>: >> Wow. Indeed you can -- I just tested this myself. How is this >> accomplished? I guess the CRT has a backchannel to talk to itself when >> it creates a process using spawn*? > > CreateProcess() takes a STARTUPINFO argument with undocumented fields > cbReserved2, lpReserved2. They are used to pass an array of fds. So would it be possible to implement the pass_fds parameter of subprocess using spawnl() or the undocumented fields? And is it possible to close all handles except one (implement "pass_handles")? The idea would be to use something subprocess.Popen(cmd, pass_fds=[pipe_rfd], close_fds=True) or subprocess.Popen(cmd, pass_handles=[pipe_rhandle], close_handles=True) instead of subprocess.Popen(cmd, close_fds=False). > In the experimental branch of multiprocessing, child processes > no longer inherit unnecessary handles. Where is this branch? How did you create the channel between the manager and the worker? Victor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4