From owner-freebsd-current Sun Oct 22 7: 6:46 2000 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 2B75337B479 for ; Sun, 22 Oct 2000 07:06:44 -0700 (PDT) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id KAA12180; Sun, 22 Oct 2000 10:06:09 -0400 (EDT) Date: Sun, 22 Oct 2000 10:06:09 -0400 (EDT) From: Daniel Eischen To: Andrey Rouskol Cc: freebsd-current@FreeBSD.ORG Subject: Re: test from mysql's configure In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 22 Oct 2000, Andrey Rouskol wrote: > > Hi there ! > > Some days ago I was tring to compile mysql at -current and found that > ./configure freezes at 'checking for restartable system calls'. Here is a > code witch is executed - if you compile it with '-lc_r -lm -lcrypt' it will It should be using -pthread not -lc_r. > freeze. > > test.c: > > /* Exit 0 (true) if wait returns something other than -1, > i.e. the pid of the child, which means that wait was restarted > after getting the signal. */ > #include > #include > ucatch (isig) { } > main () { > int i = fork (), status; > if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } > signal (SIGINT, ucatch); > status = wait(&i); > if (status == -1) wait(&i); > exit (status == -1); > } Yes, I can repeat this problem also. I haven't figured it out yet, but it seems like the process signal mask is getting hosed somehow. If you modify the test to print out the process signal mask, it mysteriously works: #include #include ucatch (isig) { } main () { int i = fork (), status, mask[20]; if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } _thread_sys_sigprocmask(SIG_SETMASK, NULL, (sigset_t *)mask); printf ("Signal mask before installing handler: 0x%x\n", mask[0]); signal (SIGINT, ucatch); _thread_sys_sigprocmask(SIG_SETMASK, NULL, (sigset_t *)mask); printf ("Signal mask after installing handler: 0x%x\n", mask[0]); status = wait(&i); if (status == -1) wait(&i); exit (status == -1); } -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message