[13454] in Athena Bugs

home help back first fref pref prev next nref lref last post

A SOLARIS/SGI bug.

daemon@ATHENA.MIT.EDU (Christopher Provenzano)
Fri Apr 28 23:23:09 1995

To: bugs@MIT.EDU, cfields@MIT.EDU, miki@MIT.EDU
Cc: proven@MIT.EDU, tytso@MIT.EDU
Date: Fri, 28 Apr 1995 23:23:01 EDT
From: Christopher Provenzano  <proven@MIT.EDU>


This piece of code coredumps after recursivly calling foo() on both SOLARIS
and SGI platforms.


#include <signal.h>

void foo(int sig)
{
    printf("Got a signal1\n");
    signal(SIGCHLD, foo);
    printf("Got a signal2\n");
}

main()
{
    int i;

    signal(SIGCHLD, foo);
    for(i = 1; i < 10; i++) {
        switch(fork()) {
        case 0:
                printf("fork successful\n");
                exit(0);
        case -1:
                printf("error fork\n");
                exit(1);
        default:
                break;
        }
    }
}

Craig, I think this is similar to the problem you and dkk saw on the SGI a 
few months ago.

CAP



home help back first fref pref prev next nref lref last post