On 23/02/2010 14:35, Jan Stary whispered from the shadows...: > On Feb 23 13:36:56, Anthony Howe wrote: >> I have a daemon process I've written and trying to debug, however, >> whenever it crashes, I get no core file. >> >> 1. The daemon does a setrlimit of RLIMIT_CORE to RLIM_INFINITY (same as >> if I had done "ulimit -H -c unlimited" in the shell before starting the >> process). >> >> 2. The daemon sets its working directory to /var/tmp, which is writeable >> by every one, yet no core file appears. Likewise /var/crash has no core >> file. >> >> 3. The program does not use file system setuid bits, BUT does use the >> setuid() et al. system calls to drop privileges from root to some other >> user (which can write into /var/tmp). >> >> 4. A find / -name '*.core' finds nothing anywhere. >> >> 5. I've even tried sysctl kern.nosuidcoredump=0 and >> kern.nosuidcoredump=2 thinking that the setuid family of system >> functions might be resetting a flag when I drop privileges. >> >> 6. Even forcing a SIGABRT, which should produce a core, does not create >> one. >> >> >> What am I missing in order to get a daemon process on OpenBSD to dump >> core when it crashes? > > Depends on how exactly it "crashes", man sigaction(2). > Are you possibly catching the signals yourself?
I trap several signals, but not SIGABRT. -- Anthony C Howe Skype: SirWumpus SnertSoft +33 6 11 89 73 78 Twitter: SirWumpus BarricadeMX & Milters http://snert.com/ http://nanozen.info/ http://snertsoft.com/