mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: Manfred Spraul <manfred@colorfullife.com>,
	roland@redhat.com, torvalds@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use pid_alive in proc_pid_status
Date: Mon, 29 Nov 2004 10:41:52 +0100	[thread overview]
Message-ID: <20041129094152.GB7868@elte.hu> (raw)
In-Reply-To: <20041128222151.4d53fd14.akpm@osdl.org>


* Andrew Morton <akpm@osdl.org> wrote:

> >  +int pid_alive(struct task_struct *p)
> >  +{
> >  +	return p->pids[PIDTYPE_PID].nr != 0;
> >  +}
> 
> Can we not simply test p->exit_state?  That's already done in quite a
> few places and making things consistent would be nice.

as long as it's accessed from under the tasklist_lock, it ought to be
fine to check for p->exit_state != EXIT_DEAD and dereference
p->group_leader afterwards.

	Ingo

  reply	other threads:[~2004-11-29  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28 11:24 Manfred Spraul
2004-11-28 23:20 ` Linus Torvalds
2004-11-29  6:21 ` Andrew Morton
2004-11-29  9:41   ` Ingo Molnar [this message]
2004-11-29 17:58     ` Manfred Spraul
2004-12-03  1:04       ` Roland McGrath

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=20041129094152.GB7868@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=roland@redhat.com \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®