分类: LINUX
2009-10-14 20:18:34
If it's a core dump of a program that you wrote yourself, normally the file is called "core" and is in the working directory from which you ran it. A segmentation fault is usually a memory-handling error (like an invalid or NULL pointer, for example).
It appears that resource limits (which include the maximum size of a core dump file) are set by PAM on login. The settings for these limits are in /etc/security/limits.conf, which on my system (which is unmodified) is comments only. A quick look at the source code suggests that the default core dump limit is 0 (zero), which means no dump at all is created (even though the message suggests otherwise).
In summary: edit /etc/security/limits.conf, set the core limit to be non-zero (measured in kilobytes), and log in again.
在ubuntu下一开始有core文件大小的限制,修改/etc/security/limits.conf后重新login就能产生core了