From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23977 invoked by alias); 3 Jul 2008 13:52:48 -0000 Received: (qmail 23799 invoked by uid 48); 3 Jul 2008 13:52:02 -0000 Date: Thu, 03 Jul 2008 13:52:00 -0000 Message-ID: <20080703135202.23798.qmail@sourceware.org> From: "halesh dot s at gmail dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20040915163338.386.sebastien.decugis@ext.bull.net> References: <20040915163338.386.sebastien.decugis@ext.bull.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nptl/386] pthread_create returns ENOMEM but should return EAGAIN X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00006.txt.bz2 ------- Additional Comments From halesh dot s at gmail dot com 2008-07-03 13:52 ------- Hi, Even pthread_create() returns the errno, but it doestnot sets the errno EAGAIN, instead it retains the ENOMEM. I have verified in glibc-2.7. Thats why the attached testcase results in.. $gcc -o test test.c -lpthread $./test pthread_create : Cannot allocate memory -> 12 Created 405 threads pthread_create : Cannot allocate memory -> 12 .......... .......... errno value set to 12 (ENOMEM) but needs to be EAGAIN. Ths attached patch fixes this issue. $./test pthread_create : Resource temporarily unavailable -> 11 Created 405 threads pthread_create : Resource temporarily unavailable -> 11 ................ ................ Thanks, Halesh -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME | http://sourceware.org/bugzilla/show_bug.cgi?id=386 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.