Re: Autotools macro to test for pthreads fails with "Resource lost" on hurd

Thomas Schwinge <[email protected]>
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Hello!

First: thanks for reporting this!

On Tue, Aug 18, 2009 at 11:42:20AM -0700, Daniel Moerner wrote:
> configure:8557: gcc -o conftest -g -O2 -pthread   -rdynamic conftest.c -lnsl -ldl -lm  >&5
> configure:8561: $? = 0
> configure:8567: ./conftest
> ./configure: line 8569: 16392 Resource lost           ./conftest$ac_exeext
> configure:8571: $? = 160
> configure: program exited with status 160
> configure: failed program was:
> | /* confdefs.h.  */
> | #define [...]
> | #define HAVE_PTHREAD_H 1
> | /* end confdefs.h.  */
> | #include <pthread.h>
> | int
> | main(void)
> | {
> |   pthread_kill(pthread_self(), 0);
> | }

This can indeed be reproduce independently:

    thomas@dirichlet:~ $ cat p.c
    #include <pthread.h>
    int
    main(void)
    {
      pthread_kill(pthread_self(), 0);
    }
    thomas@dirichlet:~ $ uname -a
    Linux dirichlet 2.6.31-5-generic #24-Ubuntu SMP Sat Aug 1 12:48:18 UTC 2009 i686 GNU/Linux
    thomas@dirichlet:~ $ gcc p.c -lpthread
    thomas@dirichlet:~ $ ./a.out 
    thomas@dirichlet:~ $ echo $?
    0

    tschwinge@flubber:~ $ uname -a
    GNU flubber 0.3 GNU-Mach 1.3.99/Hurd-0.3 i386-AT386 GNU
    tschwinge@flubber:~ $ gcc p.c -lpthread
    tschwinge@flubber:~ $ ./a.out 
    Resource lost
    tschwinge@flubber:~ $ echo $?
    160

So this is either something invalid to do (I didn't check yet), or it is
a bug in our libpthread.  Stay tuned.


Regards,
 Thomas
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFKiv3qsmqaiQAHQR4RArTeAKC8vDAVoMvhCs68HyxJGqSdwfLeoACgqLhC
YVR69XDe3mWMkPmIfrYQNXg=
=rmuI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.