<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/PC/_subprocess.c, branch v2.7</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>Untabify C files. Will watch buildbots.</title>
<updated>2010-05-09T14:46:46+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2010-05-09T14:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=7674841ef015b47767c7939c16a8ea1fe92ae340'/>
<id>7674841ef015b47767c7939c16a8ea1fe92ae340</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #7838. Add docstrings and privatize _subprocess implementation details.</title>
<updated>2010-04-24T15:40:11+00:00</updated>
<author>
<name>Brian Curtin</name>
<email>brian.curtin@gmail.com</email>
</author>
<published>2010-04-24T15:40:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=5a1cb9e41ec7fde2cbaa97379ef6e03e29081f36'/>
<id>5a1cb9e41ec7fde2cbaa97379ef6e03e29081f36</id>
<content type='text'>
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement #1220212. Add os.kill support for Windows.</title>
<updated>2010-04-02T23:26:06+00:00</updated>
<author>
<name>Brian Curtin</name>
<email>brian.curtin@gmail.com</email>
</author>
<published>2010-04-02T23:26:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=eaa9a2c608e6fb55c794688c77bb84a50532ca5d'/>
<id>eaa9a2c608e6fb55c794688c77bb84a50532ca5d</id>
<content type='text'>
os.kill takes one of two newly added signals, CTRL_C_EVENT and
CTRL_BREAK_EVENT, or any integer value. The events are a special case
which work with subprocess console applications which implement a
special console control handler. Any other value but those two will
cause os.kill to use TerminateProcess, outright killing the process.

This change adds win_console_handler.py, which is a script to implement
SetConsoleCtrlHandler and applicable handler function, using ctypes.

subprocess also gets another attribute which is a necessary flag to
creationflags in Popen in order to send the CTRL events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
os.kill takes one of two newly added signals, CTRL_C_EVENT and
CTRL_BREAK_EVENT, or any integer value. The events are a special case
which work with subprocess console applications which implement a
special console control handler. Any other value but those two will
cause os.kill to use TerminateProcess, outright killing the process.

This change adds win_console_handler.py, which is a script to implement
SetConsoleCtrlHandler and applicable handler function, using ctypes.

subprocess also gets another attribute which is a necessary flag to
creationflags in Popen in order to send the CTRL events.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #5179: Fixed subprocess handle leak on failure on windows.</title>
<updated>2009-03-03T22:18:14+00:00</updated>
<author>
<name>Hirokazu Yamamoto</name>
<email>ocean-city@m2.ccsnet.ne.jp</email>
</author>
<published>2009-03-03T22:18:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=47b57e7ffac15abfdac378311c330429ebd86fdc'/>
<id>47b57e7ffac15abfdac378311c330429ebd86fdc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix issue3120 - don't truncate handles on 64-bit Windows.</title>
<updated>2008-07-20T00:22:08+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@mad-scientist.com</email>
</author>
<published>2008-07-20T00:22:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=5a1b8d68b8f8eb78714a2425f3ee1a74a43fb760'/>
<id>5a1b8d68b8f8eb78714a2425f3ee1a74a43fb760</id>
<content type='text'>
This is still messy, realistically PC/_subprocess.c should never cast pointers
to python numbers and back at all.

I don't have a 64-bit windows build environment because microsoft apparently
thinks that should cost money.  Time to watch the buildbots.  It builds and
passes tests on 32-bit windows.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is still messy, realistically PC/_subprocess.c should never cast pointers
to python numbers and back at all.

I don't have a 64-bit windows build environment because microsoft apparently
thinks that should cost money.  Time to watch the buildbots.  It builds and
passes tests on 32-bit windows.
</pre>
</div>
</content>
</entry>
<entry>
<title>This reverts r63675 based on the discussion in this thread:</title>
<updated>2008-06-09T04:58:54+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@mad-scientist.com</email>
</author>
<published>2008-06-09T04:58:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=134de0271f8611c6d4f4e53f3d45ee8eed65e3ab'/>
<id>134de0271f8611c6d4f4e53f3d45ee8eed65e3ab</id>
<content type='text'>
 http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
</pre>
</div>
</content>
</entry>
<entry>
<title>Renamed PyString to PyBytes</title>
<updated>2008-05-26T12:51:38+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2008-05-26T12:51:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=a6ca04c089701c8156af6ee8a1f984d1fd98119d'/>
<id>a6ca04c089701c8156af6ee8a1f984d1fd98119d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #1500293: fix memory leaks in _subprocess module.</title>
<updated>2006-06-04T22:15:37+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2006-06-04T22:15:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=03e178e9eba80883a289ca629daa793b2770fb26'/>
<id>03e178e9eba80883a289ca629daa793b2770fb26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert more modules to METH_VARARGS.</title>
<updated>2006-05-29T21:58:42+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2006-05-29T21:58:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=21b9867735adc2e6797bef46fb70cff080b07bb1'/>
<id>21b9867735adc2e6797bef46fb70cff080b07bb1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Years in the making.</title>
<updated>2006-03-26T23:27:58+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2006-03-26T23:27:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=4fe5430cd5d8d129b288fd1e155abafce4d026b7'/>
<id>4fe5430cd5d8d129b288fd1e155abafce4d026b7</id>
<content type='text'>
objimpl.h, pymem.h:  Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build.  They're aliases for the
system free() now.

_subprocess.c/sp_handle_dealloc():  Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).

pythonrun.c, tokenizer.c, parsermodule.c:  I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject.  Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.

If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
objimpl.h, pymem.h:  Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build.  They're aliases for the
system free() now.

_subprocess.c/sp_handle_dealloc():  Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).

pythonrun.c, tokenizer.c, parsermodule.c:  I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject.  Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.

If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
</pre>
</div>
</content>
</entry>
</feed>
