Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
Is it possible to dump the core but not exit the process?

I want to be able to generate a core dump but not exit the process afterwards. I don't need it to continue execution, just not die. This is a C++ Ubuntu process.

I believe I'm dumping the core in a pretty standard way: I catch the offending signal via setting the signal handler with signal(), I set the core size limit via setrlimit() and then I prompt the core dump with signal() and raise():

signal(SIGSEGV, OnPosixSignal);

...

void OnPosixSignal(int iSignal)
{
    struct rlimit CoreLimit;
    CoreLimit.rlim_cur = RLIM_INFINITY;
    CoreLimit.rlim_max = RLIM_INFINITY;
    setrlimit(RLIMIT_CORE, &CoreLimit);
    signal(iSignal, SIG_DFL);
    raise(iSignal);
}

Is there something I can do to not have the process exit after dumping the core?

Thanks a bunch in advance!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can also do that using gcore:

Generate a core dump of a running program with process ID pid. Produced file is equivalent to a kernel produced core file as if the process crashed (and if "ulimit -c" were used to set up an appropriate core dump limit). Unlike after a crash, after gcore the program remains running without any change.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!