[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] GNULIB wait-process module.

From: Bruno Haible
Subject: Re: [bug-gnulib] GNULIB wait-process module.
Date: Fri, 4 Mar 2005 13:32:09 +0100
User-agent: KMail/1.5

Derek Price wrote:
> Hello.  I was looking at removing CVS's internal waitpid substitute in
> favor of the GNULIB wait-process module, but it's missing one feature
> I need.  CVS needs to detect core dumps in the child of the server so
> that the parent knows not to clean up the temporary workspace the
> server is using.  This is for debugging purposes, really, but I can
> think of no good alternative ...
> Would you be amenable to a modification to wait-process that allows
> core dumps to be detected?

Hmm, there is a problem with it.
  1) Core dumps are a Unix specific feature. They don't exist on Windows.
     gnulib tries to make portable APIs. - What would you think should your
     debugging code do on Windows?
  2) The very idea of a parent process being responsible for helping debug
     the child process makes me shudder, because it makes it hard to
     replace the parent or the client program. The idea of a "program" is
     that it can be invoked from any parent program. - What would you think
     of moving that debugging-helper code from the parent to the child process,
     and activate it when the child got a SIGABRT, SIGFPE, SIGSEGV or SIGBUS?
     This would be mostly portable to Windows: catching SIGABRT on Windows as
     well, and SIGSEGV, SIGBUS (even stack overflow) can be caught through
     libsigsegv. Only about SIGFPE I'm not sure whether you can catch it
     on Windows as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]