On Sun, Feb 15, 2004 at 05:38:47PM -0800, Peter Jay Salzman wrote: > I've noticed some core files have a number appended to them, like: > > core.2342 > > The number is most likely a pid, but I'm curious how the core file got > named this way. Is there a libc function that sets the name of a > possible future core file? > > Do core files automatically get a pid appended to their name when a > program forks?
On 2.6 kernels, check out /proc/sys/kernel/core_pattern and /proc/sys/kernel/core_uses_pid . You can set a naming pattern for core dumps and control whether the PID gets appended to the end of core file names or not. I believe these features were added sometime during the 2.5 development so I'm not sure if/when they were backported to 2.4. There's documentation about them in Documentation/sysctl/kernel.txt under your kernel source tree. I also seem to recall reading somewhere that the PID gets appended automatically for multi-threaded applications. Matt -- ************************************************* * Matt Roper <[EMAIL PROTECTED]> * * http://www.mattrope.com * * PGP Key: http://www.mattrope.com/mattrope.asc * ************************************************* _______________________________________________ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
