Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758796AbYAGWX6 (ORCPT ); Mon, 7 Jan 2008 17:23:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753595AbYAGWXv (ORCPT ); Mon, 7 Jan 2008 17:23:51 -0500 Received: from mx1.redhat.com ([66.187.233.31]:50131 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753005AbYAGWXu (ORCPT ); Mon, 7 Jan 2008 17:23:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Andrew Morton , Linus Torvalds Cc: linux-kernel@vger.kernel.org Subject: [PATCH] acct: real_parent ppid X-Zippy-Says: My face is new, my license is expired, and I'm under a doctor's care!!!! Message-Id: <20080107222334.E058B26F9A5@magilla.localdomain> Date: Mon, 7 Jan 2008 14:23:34 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 28 The ac_ppid field reported in process accounting records should match what getppid() would have returned to that process, regardless of whether a debugger is attached. Signed-off-by: Roland McGrath --- kernel/acct.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/acct.c b/kernel/acct.c index cf19547..521dfa5 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -482,7 +482,7 @@ static void do_acct_process(struct file *file) #endif #if ACCT_VERSION==3 ac.ac_pid = current->tgid; - ac.ac_ppid = current->parent->tgid; + ac.ac_ppid = current->real_parent->tgid; #endif spin_lock_irq(¤t->sighand->siglock); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/