Mar 16

[原] bash 下修改 ulimit 的 pipe size 报错 不指定

linuxing , 10:57 , 基础知识 , 评论(0) , 引用(0) , 阅读(3726) , Via 本站原创 | |
    用 python subprocess 捕获命令行输出结果失去响应,怀疑是 pipe size 太小,尝试修改。
    但报错:
# ulimit -p 16
-bash: ulimit: pipe size: cannot modify limit: Invalid argument

默认值:
引用
# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 14848
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 14848
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

修改:
# ulimit -p 16
-bash: ulimit: pipe size: cannot modify limit: Invalid argument


排查了一下,发现网上的资料都是错的,一堆的都是 ksh 的修改。实际上,bash 中这个值是不能改的。
见:
bash: ulimit: pipe size: cannot modify limit: Invalid argument
引用
Getting this error because this is not an adjustable parameter.
Refer the manual page for ulimit:
-p The pipe size in 512-byte blocks (this may not be set)
This value can not set. You would probably need to recompile the kernel after changing a header file to alter this value, which is not feasible.
Tags:
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]