xfs
[Top] [All Lists]

Re: [PATCH] xfsdump: properly set Parent's PID

To: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Subject: Re: [PATCH] xfsdump: properly set Parent's PID
From: Rich Johnston <rjohnston@xxxxxxx>
Date: Tue, 12 Mar 2013 11:34:06 -0500
Cc: <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1359663197-30473-1-git-send-email-cmaiolino@xxxxxxxxxx>
References: <1359663197-30473-1-git-send-email-cmaiolino@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
On 01/31/2013 02:13 PM, Carlos Maiolino wrote:
Set parentpid variable to the correct Parent's ID using getppid() instead of
getpid()

Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
---
  common/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/main.c b/common/main.c
index 980d2d4..848a887 100644
--- a/common/main.c
+++ b/common/main.c
@@ -198,7 +198,7 @@ main( int argc, char *argv[] )
        /* Get the parent's pid. will be used in signal handling
         * to differentiate parent from children.
         */
-       parentpid = getpid( );
+       parentpid = getppid( );
        rval = atexit(mlog_exit_flush);
        assert(rval == 0);


Sorry for the late review, this does not apply to current xfsdump tree.

Regards
--Rich

<Prev in Thread] Current Thread [Next in Thread>