Path: csiph.com!goblin3!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'exit': 0.07; 'module)': 0.09; 'received:internal': 0.09; 'subject:skip:m 10': 0.09; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'simulate': 0.16; 'wrote:': 0.16; 'frameworks': 0.18; 'windows': 0.20; 'sep': 0.22; '(you': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'fri,': 0.27; 'mind,': 0.29; '(including': 0.30; 'up.': 0.32; 'related': 0.32; 'though,': 0.32; 'sometimes': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'does': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'protection': 0.60; 'chance': 0.60; 'header:Message-Id:1': 0.61; 'lacks': 0.84; 'subject:down': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=PzzaGQcDDuJHTSsHpK1UgO3VTeI=; b=69cshd bOkz/rquk/CMF5b3pL9OtLgP89JFSSp7V4V2KyuNFnTT2YN3jMYEYvFKytODPuYv Mt4mHvrmSPzt+p+Qgy65VwOFwBjgKCeHRKQHS2sMICY8XFVWg05j7qj7c/th3Dez RF13NAoA6sr9U7tDiBcL+YI+Xd1vhl2KdlVM8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=PzzaGQcDDuJHTSs HpK1UgO3VTeI=; b=JLxlB3QpwbeneP41Npo+3N9nlAkQGvAY2icDoFRr2xVNsig kgV1rOfb8n34SiHZD+EaVhd5RGE8xaOFtbTkyp02/V6J64CJwADcOVqTrH1UDgfP QJN0j8hy7A8uR8ZMrKRbFgdfQtM4OntGYwLiqN/AWGqZRmcbP7nU9uWK2ug4= X-Sasl-Enc: 885pSU0vp/PO4UQH/6X5gUP00mUmB3uQbEGcwZguutqp 1442612909 From: Random832 To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-e92f8263 In-Reply-To: References: Subject: Re: Shutting down a cross-platform multithreaded app Date: Fri, 18 Sep 2015 17:48:29 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442612913 news.xs4all.nl 23843 [2001:888:2000:d::a6]:48749 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96840 On Fri, Sep 18, 2015, at 17:40, Chris Angelico wrote: > Bear in mind, though, that Windows has no protection against other > processes shutting you down. Neither does Unix. Any process that can send you a signal can send you SIGKILL. Of course, what Windows lacks is a generalized way for other processes to send "less destructive" signals that do give you a chance to clean up. (You can sometimes send a ctrl-break event, but that's it.) And most frameworks for "emulating" them (including python's os module) simulate sending other signals by calling TerminateProcess with an exit status related to the signal.