Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!cs.utexas.edu!uunet!prcrs!mcvic From: mcvic@prcrs.UUCP (David J. McVicar) Newsgroups: comp.unix.wizards Subject: Need signal handler that will rename core file. Keywords: core, signals Message-ID: <1436@prcrs.UUCP> Date: 14 May 89 16:53:59 GMT Organization: PRC Realty Systems, McLean, VA Lines: 23 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