Re: core dump

From: Erik Andersen (andersen@xmission.com)
Date: Tue Jan 11 2000 - 10:59:10 EST


On Mon Jan 03, 2000 at 01:06:30PM +0200, Christophe leroy wrote:
> Is there a way to make a core dump of a program without killing it,
> in order to make some debugging while the program is still running ?
>

You mean something like this?

    #include <stdio.h>
    #include <signal.h>

    void main(void)
    {
        while(1) {
            fprintf(stderr, "hello\n");
            sleep(1);
            if (fork() == 0) {
                raise(11);
            }
        }
    }

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:18 EST