Date: Sun, 22 Oct 2000 10:06:09 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: Andrey Rouskol <anry@sovintel.ru> Cc: freebsd-current@FreeBSD.ORG Subject: Re: test from mysql's configure Message-ID: <Pine.SUN.3.91.1001022100211.11601A-100000@pcnet1.pcnet.com> In-Reply-To: <Pine.BSF.4.21.0010221657400.10805-100000@anry.sovintel.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/types.h> > #include <signal.h> > 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 <sys/types.h> #include <signal.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001022100211.11601A-100000>