Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA21284; Fri, 2 Feb 96 13:08:20 EST
Received: from george.lbl.gov by MIT.EDU with SMTP
	id AA11981; Fri, 2 Feb 96 13:03:03 EST
Received: (jin@localhost) by george.lbl.gov (8.6.10/8.6.5) id KAA23693 for pthreads@mit.edu; Fri, 2 Feb 1996 10:03:21 -0800
Date: Fri, 2 Feb 1996 10:03:21 -0800
From: "Jin Guojun[ITG]" <jin@george.lbl.gov>
Message-Id: <199602021803.KAA23693@george.lbl.gov>
To: pthreads@MIT.EDU
Subject: select exited on signal 6
Content-Length: 932

Does any one know why this happens?  Please help.

% cc testing.c -lpthread
% .a.out
foobar:printing PID:20402
main:printing, PID:20401
main:printing, PID:20401
main:printing, PID:20401
^C

% tail /var/log/messages
Feb  2 09:32:16 hostname /kernel: pid 20402: a.out: uid 010: exited on signal 6

------------------------------- testing.c -----------------------------

void *foobar()
{
int cnt=3;
struct timeval to={5,0};
        while(cnt-->0)
        {
                printf("foobar:printing PID:%d\n",getpid());
                select(10,NULL,NULL,NULL,&to);
        }
}

main()
{
int cnt=3;
struct timeval to={5,0};

        if (fork()==0)
                foobar();

        while(cnt-->0)
        {
                printf("main:printing, PID:%d\n",getpid());
                select(10,NULL,NULL,NULL,&to);
        }
}

------------------------------- testing.c -----------------------------

compile:
	cc testing.c -lpthread

