当 Octave 崩溃时,我如何禁止它在工作目录中创建 octave-workspace 文件?
我在 octave_core_file_options() 中没有看到任何禁用它的选项.这可能吗?也许通过在终止时自动删除文件来进行黑客攻击? (问题是 .octaverc 在开始时运行)
最佳答案
你要找的是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_limit
、octave_core_file_name
和octave_core_file_options
)的名称中带有“octave_core”的原因而不是“octave_workspace”,在旧版本中,文件的默认名称是“octave-workspace”。
你怎么能自己找到这个?
- 根据您的问题,您已经知道
octave_core_file_options
。如果您看到该功能帮助文本的底部,您会发现:See also: crash_dumps_octave_core, octave_core_file_name, octave_core_file_limit.
- 通过调用
doc octave_core
查看有关此函数的手册部分 可以使用
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.
关于configuration - Octave :禁用 Octave 工作区崩溃文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33364537/