From: Andrew Morton <akpm@osdl.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: mingo@elte.hu, roland@redhat.com, torvalds@osdl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use pid_alive in proc_pid_status
Date: Sun, 28 Nov 2004 22:21:51 -0800 [thread overview]
Message-ID: <20041128222151.4d53fd14.akpm@osdl.org> (raw)
In-Reply-To: <41A9B589.1090005@colorfullife.com>
Manfred Spraul <manfred@colorfullife.com> wrote:
>
> +/**
> + * pid_alive - check that a task structure is not stale
> + * @p: Task structure to be checked.
> + *
> + * Test if a process is not yet dead (at most zombie state)
> + * If pid_alive fails, then pointers within the task structure
> + * can be stale and must not be dereferenced.
> + */
> +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.
next prev parent reply other threads:[~2004-11-29 6:24 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 [this message]
2004-11-29 9:41 ` Ingo Molnar
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=20041128222151.4d53fd14.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=mingo@elte.hu \
--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
Powered by JetHome