简体   繁体   中英

octave: disable octave-workspace crash file

How can I disable Octave from creating an octave-workspace file within the working directory when it crashes?

I don't see any option to disable it in octave_core_file_options() . Is this possible? Maybe through a hack by automatically removing the file at termination? (the problem is .octaverc runs at start)

Related (but not duplicate): Hide octave-workspace file from home directory

What you're looking for is crash_dumps_octave_core :

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.

Just for completeness, the reason why this family of functions ( octave_core_file_limit , octave_core_file_name , and octave_core_file_options ) have "octave_core" on the name instead of "octave_workspace", is that on older releases the default name of the file was "octave-workspace".

How could you have found this yourself?

  1. from your question, you already knew about octave_core_file_options . If you see the bottom of that function help text, you will find:

    See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_limit.

  2. Take a look at the manual section about this function by calling doc octave_core
  3. you can use the lookfor command to search functions:

     octave> lookfor octave_core crash_dumps_octave_core Query or set the internal variable that controls whethe r Octave tries to save all current variables to the file ' 'octave-workspace' if it crashes or receives a hangup, ter rminate or similar signal. octave_core_file_limit Query or set the internal variable that specifies the ma ximum amount of memory (in kilobytes) of the top-level wor rkspace that Octave will attempt to save when writing data a to the crash dump file (the name of the file is specifie ed by OCTAVE_CORE_FILE_NAME). octave_core_file_name Query or set the internal variable that specifies the nam e of the file used for saving data from the top-level work kspace if Octave aborts. octave_core_file_options Query or set the internal variable that specifies the options used for saving the workspace data if Octave abort ts. sighup_dumps_octave_core Query or set the internal variable that controls wheth er Octave tries to save all current variables to the file 'octave-workspace' if it receives a hangup signal. sigterm_dumps_octave_core Query or set the internal variable that controls whet her Octave tries to save all current variables to the file e 'octave-workspace' if it receives a terminate signal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM