From owner-freebsd-net@FreeBSD.ORG Tue Sep 3 20:23:32 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42DFB89B for ; Tue, 3 Sep 2013 20:23:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1188A26A5 for ; Tue, 3 Sep 2013 20:23:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B7FA6B965; Tue, 3 Sep 2013 16:23:30 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Subject: Re: Does pthread_set_name_np() work? Date: Tue, 3 Sep 2013 16:06:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <1377102969.15111.YahooMailBasic@web125803.mail.ne1.yahoo.com> In-Reply-To: <1377102969.15111.YahooMailBasic@web125803.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309031606.55154.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 Sep 2013 16:23:30 -0400 (EDT) Cc: Laurie Jennings X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 20:23:32 -0000 On Wednesday, August 21, 2013 12:36:09 pm Laurie Jennings wrote: > Im trying to set the names of threads so I can distinguish them in top -H, but it doesn't seem to > take the thread id as valid. > > err=pthread_set_name_np(pthread_self(),"FOO"); This function returns void, not an error, so you can't trust the return value. -- John Baldwin