14.1.3.1 Saving Data on Unexpected Exits
If Octave for some reason exits unexpectedly it will by default save the variables available in the workspace to a file in the current directory. By default this file is named ‘octave-workspace’ and can be loaded into memory with the load
command. While the default behavior most often is reasonable it can be changed through the following functions.
- : val = crash_dumps_octave_core ()
- : old_val = crash_dumps_octave_core (new_val)
- : crash_dumps_octave_core (new_val, "local")
-
Query or set the internal variable that controls whether Octave tries to save all current variables to the file octave-workspace if it crashes or receives a hangup, terminate or similar signal.
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.See also: octave_core_file_limit, octave_core_file_name, octave_core_file_options.
- : val = sighup_dumps_octave_core ()
- : old_val = sighup_dumps_octave_core (new_val)
- : sighup_dumps_octave_core (new_val, "local")
-
Query or set the internal variable that controls whether Octave tries to save all current variables to the file octave-workspace if it receives a hangup signal.
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.
- : val = sigquit_dumps_octave_core ()
- : old_val = sigquit_dumps_octave_core (new_val)
- : sigquit_dumps_octave_core (new_val, "local")
-
Query or set the internal variable that controls whether Octave tries to save all current variables to the file octave-workspace if it receives a quit signal.
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.
- : val = sigterm_dumps_octave_core ()
- : old_val = sigterm_dumps_octave_core (new_val)
- : sigterm_dumps_octave_core (new_val, "local")
-
Query or set the internal variable that controls whether Octave tries to save all current variables to the file octave-workspace if it receives a terminate signal.
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.
- : val = octave_core_file_options ()
- : old_val = octave_core_file_options (new_val)
- : octave_core_file_options (new_val, "local")
-
Query or set the internal variable that specifies the options used for saving the workspace data if Octave aborts.
The value of
octave_core_file_options
should follow the same format as the options for thesave
function. The default value is Octave’s binary format.When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_limit.
- : val = octave_core_file_limit ()
- : old_val = octave_core_file_limit (new_val)
- : octave_core_file_limit (new_val, "local")
-
Query or set the internal variable that specifies the maximum amount of memory that Octave will save when writing a crash dump file.
The limit is measured in kilobytes and is applied to the top-level workspace. The name of the crash dump file is specified by octave_core_file_name.
If octave_core_file_options flags specify a binary format, then octave_core_file_limit will be approximately the maximum size of the file. If a text file format is used, then the file could be much larger than the limit. The default value is -1 (unlimited).
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_options.
- : val = octave_core_file_name ()
- : old_val = octave_core_file_name (new_val)
- : octave_core_file_name (new_val, "local")
-
Query or set the internal variable that specifies the name of the file used for saving data from the top-level workspace if Octave aborts.
The default value is
"octave-workspace"
When called from inside a function with the
"local"
option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_options.
© 1996–2020 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/v6.3.0/Saving-Data-on-Unexpected-Exits.html