From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: process doesn't terminate when closing streams from another thread
Date: Wed, 9 Sep 2015 00:47:33 -0400 [thread overview]
Message-ID: <20150909044733.GA17773@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAEXMXLRpDPB0WosO+75+VjcDtud2i1cZB9510L8MOwf7ML0cBg@mail.gmail.com>
On Sun, Sep 06, 2015 at 03:44:45PM +0100, Nuno Gonçalves wrote:
> 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@OpenWrt:/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,
Thanks for the report. This should now be fixed (in git master). Let
me know if you still have problems.
Rich
prev parent reply other threads:[~2015-09-09 4:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 14:44 Nuno Gonçalves
2015-09-06 17:00 ` Szabolcs Nagy
2015-09-07 4:50 ` Rich Felker
2015-09-09 4:47 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150909044733.GA17773@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).