This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Bug with popen/pthread_create
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 6 Feb 2003 15:42:22 +0100
- Subject: Bug with popen/pthread_create
- Organization: SuSE Linux AG, Nuernberg, Germany
Hi,
the appendend testprogram works fine with glibc 2.2.x, but it does
not work with current glibc from CVS. The "printf("in main\n");
is never reached. If I don't call popen(), it works fine. Any ideas,
what could go wrong? This happens on all architectures.
#include <stdio.h>
#include <pthread.h>
void *foo(){
printf("in foo\n");
return NULL;
}
int main() {
int rc;
pthread_t threadID;
FILE *fd;
fd = popen("/bin/ls", "r");
pclose(fd);
rc = pthread_create(&threadID, NULL, &foo, NULL);
printf("in main\n");
return rc;
}
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Deutschherrnstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B