八度:禁用八度工作区崩溃文件

octave: disable octave-workspace crash file

如何在 Octave 崩溃时禁止在工作目录中创建八度工作区文件?

我在 octave_core_file_options() 中没有看到任何禁用它的选项。这可能吗?也许通过在终止时自动删除文件来进行黑客攻击? (问题是 .octaverc 在开始时运行)

相关(但不重复):Hide octave-workspace file from home directory

您要找的是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.

只是为了完整起见,这一系列函数(octave_core_file_limitoctave_core_file_nameoctave_core_file_options)在名称上使用 "octave_core" 而不是 [=37] 的原因=], 是在旧版本上文件的默认名称是 "octave-workspace".

你怎么能自己找到这个?

  1. 根据你的问题,你已经知道 octave_core_file_options。如果您看到该功能帮助文本的底部,您会发现:

    See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_limit.

  2. 通过调用 doc octave_core
  3. 查看有关此函数的手册部分
  4. 可以使用lookfor命令搜索函数:

    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.