public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zan Lynx <zlynx@acm.org>
Cc: linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: 2.6.24-rc4-mm1 and /proc/<pid>/status Name: field
Date: Fri, 7 Dec 2007 15:58:16 -0800	[thread overview]
Message-ID: <20071207155816.25a00c41.akpm@linux-foundation.org> (raw)
In-Reply-To: <1197059203.15428.5.camel@localhost>

On Fri, 07 Dec 2007 20:26:43 +0000
Zan Lynx <zlynx@acm.org> wrote:

> Today I noticed pgrep doesn't work.  It seems the reason is a missing
> Name: tag in the status file for a process in /proc.
> 
> # cat /proc/1/status
> init
> State:  S (sleeping)
> Tgid:   1
> Pid:    1
> PPid:   0
> TracerPid:      0
> ...etc, etc...
> 
> This is supposed to look like:
> # cat /proc/1/status
> Name:	init
> State:	S (sleeping)
> Tgid:	1
> Pid:	1
> PPid:	0
> TracerPid:	0
> ...
> 

Thanks.  Two (more) bugs in
proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces.patch

--- a/fs/proc/array.c~proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces-fix-3
+++ a/fs/proc/array.c
@@ -98,9 +98,9 @@ static inline void task_name(struct seq_
 
 	get_task_comm(tcomm, p);
 
+	seq_printf(m, "Name:\t");
 	end = m->buf + m->size;
 	buf = m->buf + m->count;
-	seq_printf(m, "Name:\n");
 	name = tcomm;
 	i = sizeof(tcomm);
 	while (i && (buf < end)) {
_


  reply	other threads:[~2007-12-07 23:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 20:26 2.6.24-rc4-mm1 and /proc/<pid>/status Name: field Zan Lynx
2007-12-07 23:58 ` Andrew Morton [this message]
2007-12-08  3:59   ` Eric W. Biederman

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=20071207155816.25a00c41.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zlynx@acm.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