From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 23:55:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0A5F16A4CF; Sun, 20 Jun 2004 23:55:22 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5531E43D4C; Sun, 20 Jun 2004 23:55:15 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i5KNtDVu016672; Sun, 20 Jun 2004 19:55:13 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <008901c4566c$610d1300$7890a8c0@dyndns.org> References: <008901c4566c$610d1300$7890a8c0@dyndns.org> Date: Sun, 20 Jun 2004 19:55:11 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: hackers@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 23:55:23 -0000 At 4:14 AM +0200 6/20/04, Cyrille Lefevre wrote: > >is it normal that the selected process is the last forked thread >and not the thread owner (father) ? I committed the changes, so people can try this if they want. Example: (48) ps -HO lwp,nlwp PID LWP NLWP TT STAT TIME COMMAND 1870 1870 1 ?? SL 0:00.13 sshd: gad@ttyp3 (sshd) 1871 1871 1 p3 SLs 0:00.09 -bash (bash) 2535 100002 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100001 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100004 6 p3 SL+ 0:00.00 ./cyr-thread 2535 2535 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100000 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100003 6 p3 SL+ 0:00.00 ./cyr-thread (49) ps -O lwp,nlwp PID LWP NLWP TT STAT TIME COMMAND 1870 1870 1 ?? S 0:00.13 sshd: gad@ttyp3 (sshd) 1871 1871 1 p3 Ss 0:00.09 -bash (bash) 2535 100004 6 p3 S+ 0:00.00 ./cyr-thread When the -H is not requested, why does process 2535 show up as thread-ID #100004 instead of #2535? Is that something that we need to change when copying info into kproc_info ? Or is that perfectly reasonable? I have not worked with threaded apps, so I am not sure what people would be expecting here. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu