Need signal handler that will rename core file.
David J. McVicar
mcvic at prcrs.UUCP
Mon May 15 02:53:59 AEST 1989
How can a process, while handling a core dumping signal, leave
a core file in the current working directory (or other directory, if
possible) that is not named 'core'. It is often desirable to have a
uniquely named core file, (ex. core.process.pid) for tracking problems and
debugging executables in a production environment. I have experimented with
signal handlers that will create a "dummy" core file in the current directory
when a signal is encountered, then set up a hard link to that core file using
the unique name. But, upon process termination, our UNIX kernel (Ultrix 2.2)
will always create the "real" core using a different inode number than the
"dummy" core inode, resulting in a broken link with the unique name.
The problem get's easier when you have a parent process that can
come around after a child dies and rename it's childs core, but how can this
be done in a process with no parent?
Thanks in advance for any responses.
mwmwmwmwmwmwmwmwmwmwmwmwmwmwmwm
Dave McVicar,
PRC Realty Systems,
McLean VA
mwmwmwmwmwmwmwmwmwmwmwmwmwmwmwm
More information about the Comp.unix.wizards
mailing list