[Patches] [ python-Patches-1677688 ] Support CREATE_SUSPENDED flag in subprocess.py for Win32

SourceForge.net noreply at sourceforge.net
Sat Mar 10 01:33:02 CET 2007


Patches item #1677688, was opened at 2007-03-09 16:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1677688&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Chris Heller (chrisheller)
Assigned to: Nobody/Anonymous (nobody)
Summary: Support CREATE_SUSPENDED flag in subprocess.py for Win32

Initial Comment:
The CreateProcess() function that subprocess uses on Windows allows for creation of processes in a suspended state. 

To then start the process running though you need to call ResumeThread on the primary thread of the process. Currently this thread handle gets closed, then discarded by the subprocess module. 

In order to continue making use of subprocess, but also use the CREATE_SUSPENDED flag, I modified my local copy of subprocess to retain the thread when the CREATE_SUSPENDED flag was supplied. 

If the CREATE_SUSPENDED flag is not requested, then the code behaves exactly the same as it currently does. 

The attached patch is against Subversion trunk, revision 53646. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1677688&group_id=5470


More information about the Patches mailing list