From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8462 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Nuno_Gon=C3=A7alves?= Newsgroups: gmane.linux.lib.musl.general Subject: process doesn't terminate when closing streams from another thread Date: Sun, 6 Sep 2015 15:44:45 +0100 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1441550733 18866 80.91.229.3 (6 Sep 2015 14:45:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 14:45:33 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8474-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 06 16:45:31 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZYbCB-0003yY-9b for gllmg-musl@m.gmane.org; Sun, 06 Sep 2015 16:45:27 +0200 Original-Received: (qmail 27967 invoked by uid 550); 6 Sep 2015 14:45:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27873 invoked from network); 6 Sep 2015 14:45:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=uVkFxhA6FXX9xL+9SZ0wWbjz+Hx3WJLPqpeG6WqbSDE=; b=NJSIJCWkRhSekqF2pxBH9nTziAw6BD0tRWRwAmHQOl7vYAwZrtmcy9rkhlKyEXrQH/ zZk7VqjdUtPpL5PJDE0ZwnOYxVCu8hL7oOoxOx6WI8W7/QqGo6TcXHZbder1/dEVp6Ut +nQhXopzlzVKSe3mm852CDHlx6vfwgp2ajE85VR6UpPOdGxkyz4N3DhYcGmDLk+AjHd9 u/ZLtnB7u+dxOD2oxbP1vEtSk5v+nDmEYw/LZTI0XDWrQaap+kgpRs8YIH0J7WTSfAOD k1rCC1mzLIBf4Rs3wWubJwMd/u+SDyNhnCN5IPSN/FN0vC8wsTjg1mpeR5MNWN+BigwJ gr0w== X-Received: by 10.182.225.138 with SMTP id rk10mr11768984obc.2.1441550704518; Sun, 06 Sep 2015 07:45:04 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:8462 Archived-At: 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, Nuno