Re: test from mysql's configure

2000-10-22 Thread Daniel Eischen

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
> freeze.

Fix just committed.

-- 
Dan Eischen



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: test from mysql's configure

2000-10-22 Thread Andrey Rouskol

On Sun, 22 Oct 2000, Daniel Eischen wrote:

> On Sun, 22 Oct 2000, Andrey Rouskol wrote:
> > 
> > Some days ago I was trying 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.
It makes no difference. This test freezes in this case too.

> Dan Eischen

Regards,

Andrey.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: test from mysql's configure

2000-10-22 Thread Daniel Eischen

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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message