help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What does the exit command do?


From: John W. Eaton
Subject: What does the exit command do?
Date: Wed, 22 Sep 2004 15:59:38 -0400

On 22-Sep-2004, Keith Goodman <address@hidden> wrote:

| If I become another user, say www-data, I get an error when I exit Octave:
| 
| > exit
| error: Permission denied
| 
| What does the exit command do? Does it write to a file?

You can trace what it does by looking at the code for exit, found in
src/toplev.cc.  Here is a summary:

If any functions have been registered by calls to atexit, Octave runs
them and then flushes the octave_stdout stream.

Then it

  * restores the terminal state

  * cleans up and saves the history

  * closes any open plot streams

  * closes any open octave_stream files

  * cleans up any tmp files

  * flushes the octave_stdout stream

  * exits

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]