From: ebiederm@xmission.com (Eric W. Biederman)
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: pj@sgi.com, akpm@osdl.org, linux-kernel@vger.kernel.org,
acahalan@gmail.com, jdelvare@suse.de
Subject: Re: [RFC] ps command race fix
Date: Thu, 17 Aug 2006 21:53:50 -0600 [thread overview]
Message-ID: <m1k656ya0h.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060817153258.8dfe5973.kamezawa.hiroyu@jp.fujitsu.com> (KAMEZAWA Hiroyuki's message of "Thu, 17 Aug 2006 15:32:58 +0900")
Hmm... I forgot to hit send.
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> writes:
> At first, Thanks.
>
> question:
>
> task = get_pid_task(find_next_pid(tgid), PIDTYPE_PID);
>
> Does this return only "task/process" ? and never return "thread" ?
Good point. I don't think I'm filter for thread group leaders here.
That should take a couple more lines of code.
> My another concern is that newly-created-process while ps running cannot be
> catched
> by this kind of "table walking" approach (as my previous work)
> But if people say O.K, I have no complaint.
Well it can but only if the newly created processes have a higher pid.
The guarantee that POSIX readdir makes is that you will see all directory
entries that are neither added nor deleted during the readdir.
> I(we)'ll post another list-based one in the next week, anyway.
> (I can't go-ahead this week...)
Where I see what I'm doing as being superior to that is that I'm
not writing to any global data structures. Which means what I'm doing
should scale to large machines without problem.
Eric
next prev parent reply other threads:[~2006-08-18 3:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-14 11:39 [RFC] ps command race fix KAMEZAWA Hiroyuki
2006-07-25 1:20 ` Andrew Morton
2006-07-25 1:48 ` Paul Jackson
2006-07-25 2:00 ` Andrew Morton
2006-07-25 2:08 ` KAMEZAWA Hiroyuki
2006-07-25 2:33 ` Andrew Morton
2006-07-25 2:50 ` KAMEZAWA Hiroyuki
2006-07-25 3:16 ` KAMEZAWA Hiroyuki
2006-08-13 16:29 ` Eric W. Biederman
2006-08-13 17:34 ` Andrew Morton
2006-08-13 19:00 ` Eric W. Biederman
2006-08-13 19:12 ` Paul Jackson
2006-08-16 1:23 ` KAMEZAWA Hiroyuki
2006-08-17 4:59 ` Eric W. Biederman
2006-08-17 6:32 ` KAMEZAWA Hiroyuki
2006-08-17 13:39 ` Eric W. Biederman
2006-08-17 18:16 ` Jean Delvare
2006-08-18 0:21 ` KAMEZAWA Hiroyuki
2006-08-18 3:53 ` Eric W. Biederman [this message]
2006-08-13 20:08 ` Albert Cahalan
2006-08-16 2:20 ` Kyle Moffett
2006-07-25 7:22 ` Paul Jackson
2006-07-25 1:53 ` KAMEZAWA Hiroyuki
2006-07-25 2:06 ` Andrew Morton
2006-07-25 2:34 ` KAMEZAWA Hiroyuki
2006-07-25 6:09 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2006-07-25 6:47 Albert Cahalan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1k656ya0h.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=acahalan@gmail.com \
--cc=akpm@osdl.org \
--cc=jdelvare@suse.de \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox