Brian Curtin cur...@acm.org added the comment:
Ported to py3k in r80008.
FAQ text updated in r80009 and r80010.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
anatoly techtonik techto...@gmail.com added the comment:
FAQ should be updated
http://www.python.org/doc/faq/windows/#how-do-i-emulate-os-kill-in-windows
--
nosy: +techtonik
___
Python tracker rep...@bugs.python.org
Brian Curtin cur...@acm.org added the comment:
How about something like this patch?
--
Added file: http://bugs.python.org/file16765/faq_update.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
anatoly techtonik techto...@gmail.com added the comment:
Seems good to me, even though I'd rewrite some parts like this:
- Prior to Python 2.7 and 3.2, to terminate a process, you can use ctypes::
+ Prior to Python 2.7 and 3.2, you can use linksomehow:`ctypes` to
terminate a process::
...
In
Michael Foord mich...@voidspace.org.uk added the comment:
After discussion with Brian it seems like it should be possible for
os.kill(...) on Windows to support both pids *and* process handles. This seems
ideal.
--
___
Python tracker
Changes by Brian Curtin cur...@acm.org:
Removed file: http://bugs.python.org/file16704/issue1220212.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
___
Brian Curtin cur...@acm.org added the comment:
Michael, do you have an example of something which returns a handle? This
current patch doesn't work with handles, but it wouldn't be hard to add it. I
could make it work with the _handle object of a Popen object, but you could
just as easily
Michael Foord mich...@voidspace.org.uk added the comment:
According to earlier discussion in this issue os.spawn() return process handles
on Windows.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
Brian Curtin cur...@acm.org added the comment:
Committed to trunk in r79633 after talking with Michael about it. I'll forward
port it after the 2.7 beta goes out.
--
assignee: - brian.curtin
stage: - committed/rejected
type: - feature request
___
Brian Curtin cur...@acm.org added the comment:
Here is a patch with some tests and doc changes.
I'm having trouble coming up with tests which will work with CTRL_C_EVENT and
CTRL_BREAK_EVENT. Based on my understanding of GenerateConsoleCtrlEvent, I
figured this example
Changes by Brian Curtin cur...@acm.org:
Removed file: http://bugs.python.org/file16703/issue1220212.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
___
Brian Curtin cur...@acm.org added the comment:
Removed an unnecessary goto and fixed a few tab/space inconsistencies (ugh).
--
Added file: http://bugs.python.org/file16704/issue1220212.patch
___
Python tracker rep...@bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
To make it clear, even though it would be incomplete, a partial implementation
of os.kill(...) for Windows would be very useful and provide some level of
compatibility with applications that use os.kill (so even if os.kill(...)
Michael Foord mich...@voidspace.org.uk added the comment:
To make it clear, even though it would be incomplete, a partial implementation
of os.kill(...) for Windows would be very useful and provide some level of
compatibility with applications that use os.kill (so even if os.kill(...)
Changes by Michael Foord mich...@voidspace.org.uk:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
___
___
Python-bugs-list mailing list
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
___
___
Martin v. Löwis mar...@v.loewis.de added the comment:
So, Michael, what do you think: should os.kill expect a process handle, or a
process ID?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
Michael Foord mich...@voidspace.org.uk added the comment:
Hmm... well my particular use case is that it should work with the value
returned by os.getpid(). If that is a process handle then it is nice and
convenient to just use process handles. The docs don't specify so I bet it
returns a pid.
Brian Curtin cur...@acm.org added the comment:
I have this working with process IDs and my vote would be to keep it that way,
as it would stay in-line with the other platforms, and it seems to work so far.
I would imagine that was also IronPython's goal.
I'm still working on the test portion
Michael Foord mich...@voidspace.org.uk added the comment:
It would be really useful to be able to send signal.SIGINT to processes on
Windows using os.kill(...). The patch as described sounds like it would have a
different signature to the standard implementation of os.kill(...) which takes
a
Changes by Michael Foord mich...@voidspace.org.uk:
--
versions: +Python 2.7, Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1220212
___
Michael Foord mich...@voidspace.org.uk added the comment:
I'm wrong. First IronPython tries:
NativeSignal.GenerateConsoleCtrlEvent(PythonSignal.CTRL_C_EVENT, ...)
But with the comment:
//The following calls to GenerateConsoleCtrlEvent will fail under
//most circumstances. We'll try them any
Michael Foord mich...@voidspace.org.uk added the comment:
Aaaand the IronPython implementation of
NativeSignal.GenerateConsoleCtrlEvent(PythonSignal.CTRL_C_EVENT, ...)
delegates to Kernel32.GenerateConsoleCtrlEvent.
--
___
Python tracker
Changes by Anders J. Munch [EMAIL PROTECTED]:
--
nosy: +andersjm
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1220212
___
___
Python-bugs-list mailing
Changes by Trent Nelson [EMAIL PROTECTED]:
--
nosy: +Trent.Nelson
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1220212
_
___
Python-bugs-list mailing list
Technologov added the comment:
Yes, this feature would be very important for me too...
Anybody knows, _when_ it will be integrated into Python ?
If this bugzilla supports email notifications, Please add me as CC for
this bug.
-Technologov
--
nosy: +Technologov
Christian Heimes added the comment:
This should be implemented differently. Users should substitute their
popen and exec calls with subprocess. The subprocess.Popen class should
gain two new methods terminate() and send_signal(int) where send_signal
is restricted to SIGKILL (+SIGTERM ?) on
Miki Tebeka added the comment:
Users should substitute their popen and exec calls with subprocess
As long as popen and exec are available, users are free to use them (and
probably will :)
The Popen(...).terminate() works only if I'm the one who started the
process. However there are cases
28 matches
Mail list logo