【问题标题】:Can one increase the hard limit for a ulimit parameter in Mac OS 10.7 (OS X Lion)?可以增加 Mac OS 10.7 (OS X Lion) 中 ulimit 参数的硬限制吗?
【发布时间】:2012-01-20 21:05:22
【问题描述】:

很遗憾,在尝试删除以前的核心转储时,我将核心文件大小硬限制设置为 0。有没有办法更改 ulimit 参数的硬限制?

host-101-178:Labs evan$ ulimit -c 0
host-101-178:Labs evan$ ulimit -c 1000000
-bash: ulimit: core file size: cannot modify limit: Operation not permitted
host-101-178:Labs evan$ ulimit -c unlimited
-bash: ulimit: core file size: cannot modify limit: Operation not permitted
host-101-178:Labs evan$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 2560
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 709
virtual memory          (kbytes, -v) unlimited
host-101-178:Labs evan$ ulimit -c unlimited
-bash: ulimit: core file size: cannot modify limit: Operation not permitted

【问题讨论】:

  • sysctl -a | 的输出是什么? grep core 说什么?

标签: c macos coredump ulimit


【解决方案1】:

注销并重新登录,硬核转储大小限制将恢复为默认值。使用

ulimit -S -c

更改软限制。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-27
    • 2011-12-04
    相关资源
    最近更新 更多