Hey!

On 26/Aug/2010, at 7:29 AM, Parimal Das wrote:
> How i can change this core name to a more readable one, say core.myApp.xxxx
> Also can i change the default location of core generation??


Be careful as this is controlled system wide, not per process. ;-)  

And to be clear, I've not messed with this in a long long time so please try on 
a TEST system first!

sysctl is what you're looking for:
$ sysctl -a kern.corefile
kern.corefile: /cores/core.%P


>From bsd/kern/kern_proc.c in xnu-1504.7.4 (OSX 10.6.4)
/*
 * proc_core_name(name, uid, pid)
 * Expand the name described in corefilename, using name, uid, and pid.
 * corefilename is a printf-like string, with three format specifiers:
 *  %N  name of process ("name")
 *  %P  process id (pid)
 *  %U  user id (uid)
 * For example, "%N.core" is the default; they can be disabled completely
 * by using "/dev/null", or all core files can be stored in "/cores/%U/%N-%P".
 * This is controlled by the sysctl variable kern.corefile (see above).
 */

Enjoy!
M.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to