Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEXMXLRpDPB0WosO+75+VjcDtud2i1cZB9510L8MOwf7ML0cBg@mail.gmail.com>
Date: Sun, 6 Sep 2015 15:44:45 +0100
From: Nuno Gonçalves <nunojpg@...il.com>
To: musl@...ts.openwall.com
Subject: process doesn't terminate when closing streams from another thread

I'm having problems when closing streams from another thread.

The following code:

static void *func(void *arg)
{
   fclose(stdout);
   fprintf(stderr,"Thread about to exit\n");
   return 0;
}

int main(int argc, char **argv)
{
   int thread_id;
   pthread_create(&thread_id,NULL,&func,NULL);
   pthread_join(thread_id,NULL);
   fprintf(stderr,"Process about to terminate\n");
   return 0;
}

Prints:

root@...nWrt:/tmp# ./myapp_withmusl
Thread about to exit
Process about to terminate

But never returns! I have to send it a SIGINT.

This happens on target-mips_34kc_musl-1.1.11.

Thanks,
Nuno

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.