1

I have a C process which is running as a daemon. Because of an error, it is segfaulting and terminates.

To find the problem I have enabled ulimit -c unlimited to get the coredump to analyze. But the coredump file is not generated. If I run the process without daemonizing then the coredump gets generated. The problem only happens when daemonzing the process.

What is the way to generate coredump for daemonized process?

Sean Bright
  • 118,630
  • 17
  • 138
  • 146
karthi_ms
  • 5,568
  • 11
  • 38
  • 39
  • 1
    What user is the daemon running as? is the current directory writable for the daemon? is the daemon being run setuid? is the binary readable? (note, most of these questions are based on reading `man core` which contains a list of circumstances under which core files are not created) – Hasturkun Jul 19 '12 at 12:17
  • The process running as root process ,current directory is writable , it is run setuid. – karthi_ms Jul 19 '12 at 12:53
  • How do you know it's segfaulting? Couldn't it just have terminated itself via `exit()`/`_exit()`? – alk Jul 19 '12 at 14:09
  • I could see that from my log file ( signal 11 received ). – karthi_ms Jul 20 '12 at 05:15
  • @karthi_ms: Do you have a `SIGSEGV` handler installed by any chance? that would prevent a core dump from being generated. – Hasturkun Jul 23 '12 at 07:16

0 Answers0