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

SourceForge.net noreply at sourceforge.net
Sun Mar 25 04:20:18 CEST 2007


Patches item #1677688, was opened at 2007-03-09 16:33
Message generated for change (Comment added) made by sf-robot
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: Closed
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. 

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

>Comment By: SourceForge Robot (sf-robot)
Date: 2007-03-24 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

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

Comment By: Jason Orendorff (jorend)
Date: 2007-03-09 19:50

Message:
Logged In: YES 
user_id=18139
Originator: NO

This patch doesn't work.  Three bugs: (1) bad syntax, && should be & (2)
global name CREATE_SUSPENDED isn't defined; and (3) after the if
statement, ht.Close() happens anyway.



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

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