Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda