From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 10 Feb 2005 15:58:24 -0500 From: Russ Cox To: David Leimbach Subject: Re: [9fans] off-topic linux threading bug complaint In-Reply-To: <3e1162e6050210123332be7add@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3e1162e6050210123332be7add@mail.gmail.com> Cc: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 453d78c4-eace-11e9-9e20-41e7f4b1d025 > I tried it on solaris: > > sultan% ps -p 1362 -o "lwp user pid ppid taskid pcpu pmem fname" > LWP USER PID PPID TASKID %CPU %MEM COMMAND > 1 dave 1362 1354 59 - 0.1 > 2 dave 1362 1354 59 0.0 0.1 x > > 2 Light Weight processes, one of which is defunct. Sounds similar to > the linux behavior. The Linux behavior -- that ps is misleading and gdb is unusable unless you have some magic guess as to some other "pid" -- is broken. SunOS is not broken this way: ps shows a non-zombie process, and the debugger can attach to it. % ./a.out & [3] 12058 % ps -aA -o 'user,pid,stime,time,rss,s,args' | grep a.out rsc 12058 15:55:40 0:00 920 S ./a.out % adb a.out :A 12058 $c libc.so.1`_libc_nanosleep+4(3e8, ff350234, 0, 0, 0, 0) sleeper+0xc(0, 0, 0, 0, 0, 0) libthread.so.1`_lwp_start(0, 0, 0, 0, 0, 0) ^D % Russ