Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100630
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: (Execution) Termination bit, Alternation bit. |
| Date | Sun, 20 Dec 2015 11:21:11 -0500 |
| Organization | IISS Elusive Unicorn |
| Lines | 43 |
| Message-ID | <mailman.3.1450628496.2237.python-list@python.org> (permalink) |
| References | <df0ec$56759a3e$d47876e2$54535@news.ziggo.nl> <9Bldy.3723$Bz5.1578@fx04.iad> <864af$56760c5f$d47876e2$48630@news.ziggo.nl> <QHody.3724$Bz5.3354@fx04.iad> <d8c28$56769027$d47876e2$58902@news.ziggo.nl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de TbjOrPwr5Mh1t5k6+V9yGQG+WtZ6o3qz84eUWcQJwpdg== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'warnings': 0.03; 'apis': 0.07; 'url:msdn': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terminates': 0.09; 'caveats': 0.16; 'descriptors,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:bit': 0.16; 'threads': 0.16; 'url:85)': 0.16; 'memory': 0.17; 'mechanism': 0.18; 'url:home': 0.18; 'windows': 0.20; '2015': 0.20; 'preferred': 0.20; 'terminate': 0.22; 'dec': 0.23; 'example': 0.26; 'developers': 0.26; 'header:X-Complaints-To:1': 0.26; 'wonder': 0.27; 'this.': 0.28; 'table': 0.32; 'subject:) ': 0.32; 'usually': 0.33; 'open': 0.33; 'file': 0.34; 'gives': 0.35; 'done': 0.35; 'skip:> 10': 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; 'cases': 0.36; 'url:library': 0.36; 'to:addr :python-list': 0.36; 'method': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'itself': 0.38; 'data': 0.39; 'does': 0.39; 'application': 0.39; 'system.': 0.39; 'along': 0.39; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'called': 0.40; 'some': 0.40; 'share': 0.61; "you'll": 0.61; 'further': 0.62; 'course': 0.62; 'more': 0.63; 'information': 0.63; 'url:%28': 0.66; 'url:%29': 0.66; 'url:%1': 0.67; 'url:en-us': 0.72; 'killing': 0.84; 'dennis': 0.91; 'instantly': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | adsl-108-79-218-140.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 6.00/32.1186 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100630 |
Show key headers only | View raw
On Sun, 20 Dec 2015 12:25:30 +0100, "Skybuck Flying"
<skybuck2000@hotmail.com> declaimed the following:
>
>This does make me wonder how Windows 7 terminates threads/processes/hanging
>applications.
>
>Apperently there is some kind of mechanism for this.
>
And if you've done it you'll have seen warnings about possible data
corruption or further misbehavior of the system.
>Perhaps it's not fully exposed to application developers or perhaps in a
>somewhat more complex way via all kinds of APIs ?
>
Of course it is exposed... It's even called TerminateProcess
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686714%28v=vs.85%29.aspx
>An example of how to terminate threads/processes instantly on Windows 7
>could be interesting.
There is also TerminateThread
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686717%28v=vs.85%29.aspx
but note all the caveats about its use. Along with those of
TerminateProcess. In both cases the preferred method is for the
process/thread ITSELF to call Exit(Process|Thread) in response to some
other signal that it reads.
Killing a process is usually "safe" -- the OS process information table
gives it access to the open file descriptors, memory allocation, etc. so
the OS can force close/release of resources.
Killing threads is NOT "safe" -- since they share memory/resources with
the other threads in the process.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
(Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-19 18:56 +0100
Re: (Execution) Termination bit, Alternation bit. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-19 21:27 -0500
Re: (Execution) Termination bit, Alternation bit. Chris Angelico <rosuav@gmail.com> - 2015-12-20 14:44 +1100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-20 12:25 +0100
Re: (Execution) Termination bit, Alternation bit. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-20 11:21 -0500
Re: (Execution) Termination bit, Alternation bit. eryk sun <eryksun@gmail.com> - 2015-12-20 22:04 -0600
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-21 13:40 +0100
Re: (Execution) Termination bit, Alternation bit. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-21 12:57 -0500
Re: (Execution) Termination bit, Alternation bit. Grant Edwards <invalid@invalid.invalid> - 2015-12-21 19:32 +0000
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-29 12:25 +0100
Re: (Execution) Termination bit, Alternation bit. Steven D'Aprano <steve@pearwood.info> - 2015-12-30 00:22 +1100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-29 22:43 +0100
Re: (Execution) Termination bit, Alternation bit. Chris Angelico <rosuav@gmail.com> - 2015-12-30 11:00 +1100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-03 02:18 +0100
Re: (Execution) Termination bit, Alternation bit. Steven D'Aprano <steve@pearwood.info> - 2016-01-03 19:44 +1100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-08 12:59 +0100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-29 12:42 +0100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-22 16:46 +0100
Re: (Execution) Termination bit, Alternation bit. Chris Angelico <rosuav@gmail.com> - 2015-12-23 02:56 +1100
Re: (Execution) Termination bit, Alternation bit. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-12-29 12:23 +0100
Re: (Execution) Termination bit, Alternation bit. Rustom Mody <rustompmody@gmail.com> - 2015-12-29 20:07 -0800
Re: (Execution) Termination bit, Alternation bit. Steven D'Aprano <steve@pearwood.info> - 2015-12-30 23:56 +1100
Re: (Execution) Termination bit, Alternation bit. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-30 12:19 -0500
csiph-web