From owner-svn-src-all@FreeBSD.ORG Fri Feb 12 17:25:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9D5106566B; Fri, 12 Feb 2010 17:25:59 +0000 (UTC) (envelope-from ru@freebsd.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id CD5E58FC1B; Fri, 12 Feb 2010 17:25:58 +0000 (UTC) Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NfzHA-000Eo2-HE; Fri, 12 Feb 2010 20:25:56 +0300 Date: Fri, 12 Feb 2010 20:25:54 +0300 From: Ruslan Ermilov To: Kostik Belousov Message-ID: <20100212172554.GB99835@edoofus.dev.vega.ru> References: <201002121633.o1CGX3hd067423@svn.freebsd.org> <20100212164338.GH9991@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100212164338.GH9991@deviant.kiev.zoral.com.ua> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203800 - in head/tools: regression/file/newfileops_on_fork regression/gaithrstress tools/mctest tools/netrate/http tools/netrate/httpd tools/netrate/juggle X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 17:25:59 -0000 On Fri, Feb 12, 2010 at 06:43:38PM +0200, Kostik Belousov wrote: > On Fri, Feb 12, 2010 at 04:33:03PM +0000, Ruslan Ermilov wrote: > > Author: ru > > Date: Fri Feb 12 16:33:03 2010 > > New Revision: 203800 > > URL: http://svn.freebsd.org/changeset/base/203800 > > > > Log: > > Fixed error checking of pthread(3) functions. > > > > PR: 143807 > > Submitted by: pluknet (partly) > > > > Modified: > > head/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c > > head/tools/regression/gaithrstress/gaithrstress.c > > head/tools/tools/mctest/mctest.cc > > head/tools/tools/netrate/http/http.c > > head/tools/tools/netrate/httpd/httpd.c > > head/tools/tools/netrate/juggle/juggle.c > > > > Modified: head/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c > > ============================================================================== > > --- head/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c Fri Feb 12 15:07:24 2010 (r203799) > > +++ head/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c Fri Feb 12 16:33:03 2010 (r203800) > > @@ -113,7 +113,7 @@ main(__unused int argc, __unused char *a > > err(-1, "bind"); > > if (listen(listen_fd, -1) <0) > > err(-1, "listen"); > > - if (pthread_create(&accept_thread, NULL, do_accept, NULL) < 0) > > + if (pthread_create(&accept_thread, NULL, do_accept, NULL) != 0) > > err(-1, "pthread_create"); > > sleep(1); /* Easier than using a CV. */; > > do_fork(); > > err() uses errno, so this is still not quite right ? Yes, errc() would be in order here. "eval" of -1 in the err() call is also not quite correct, and is silently converted to 255. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer