Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40208

Re: Speeding up Python's exit

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail
From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Speeding up Python's exit
Date Fri, 1 Mar 2013 01:17:12 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 20
Message-ID <kgovio$9h5$1@reader1.panix.com> (permalink)
References <512f8aa9$0$30001$c3e8da3$5496439d@news.astraweb.com>
NNTP-Posting-Host c-24-118-110-103.hsd1.mn.comcast.net
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace reader1.panix.com 1362100632 9765 24.118.110.103 (1 Mar 2013 01:17:12 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Fri, 1 Mar 2013 01:17:12 +0000 (UTC)
User-Agent slrn/0.9.9p1 (Linux)
Xref csiph.com comp.lang.python:40208

Show key headers only | View raw


On 2013-02-28, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:

> I know there is a function os._exit which effectively kills the
> Python interpreter dead immediately, without doing any cleanup. What
> are the consequences of doing this?

You loose any data you haven't saved to disk.

> I assume that the memory used by the Python process will be reclaimed
> by the operating system, but other resources such as opened files may
> not be.

All open files (including sockets, pipes, serial ports, etc) will be
flushed (from an OS standpoint) and closed.  If you've closed all the
files you've written to, there should be no danger in just pulling the
plug.

-- 
Grant

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Speeding up Python's exit Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-28 16:49 +0000
  Re: Speeding up Python's exit Neil Cerutti <neilc@norwich.edu> - 2013-02-28 17:02 +0000
  Re: Speeding up Python's exit Chris Angelico <rosuav@gmail.com> - 2013-03-01 04:06 +1100
  Re: Speeding up Python's exit Chris Angelico <rosuav@gmail.com> - 2013-03-01 04:33 +1100
  Re: Speeding up Python's exit Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-02-28 12:33 -0500
  Re: Speeding up Python's exit Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-02-28 12:31 -0500
  Re: Speeding up Python's exit Grant Edwards <invalid@invalid.invalid> - 2013-03-01 01:17 +0000
    Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 19:10 +0000
    Re: Speeding up Python's exit Dave Angel <davea@davea.name> - 2013-03-01 14:17 -0500
    Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 22:51 +0000
      Re: Speeding up Python's exit Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-03-03 18:27 -0500
    Re: Speeding up Python's exit Jason Swails <jason.swails@gmail.com> - 2013-03-01 21:51 -0500
  Re: Speeding up Python's exit Antoine Pitrou <solipsis@pitrou.net> - 2013-03-01 14:59 +0000

csiph-web