And*_*doi 1 linux dump pipe core mips
在 MIPS 平台上试过这个:
> uname -a
Linux (none) 2.6.29 #2 Mon Jan 14 13:26:04 PST 2013 mips GNU/Linux
> ulimit -c unlimited
> which gzip
/bin/gzip
> echo "|/bin/gzip - > /home/core-%t-%s-%e.gz" > /proc/sys/kernel/core_pattern
> ./fault
hello there
Segmentation fault (core dumped)
> ls /home/core*.gz
ls: /home/core*: No such file or directory
Run Code Online (Sandbox Code Playgroud)
即管道到程序不起作用。如果我指定一个文件:
> echo "/home/core-%t-%s-%e" > /proc/sys/kernel/core_pattern
Run Code Online (Sandbox Code Playgroud)
那么它的工作原理。我错过了什么?
也许它失败是因为内核没有运行任何 shell,而是尝试执行一个程序。尝试将带有重定向的 gzip 调用包装在脚本中并使用该脚本。
| 归档时间: |
|
| 查看次数: |
7368 次 |
| 最近记录: |