public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Bill Kendall <wkendall@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: allow system() to obtain exit status
Date: Thu, 12 Jan 2012 09:20:36 +1100	[thread overview]
Message-ID: <20120111222036.GK24410@dastard> (raw)
In-Reply-To: <1326316073-15033-1-git-send-email-wkendall@sgi.com>

On Wed, Jan 11, 2012 at 03:07:53PM -0600, Bill Kendall wrote:
> xfsdump explicitly ignores SIGCHLD in order to prevent librmt rsh
> processes from becoming zombies. However, doing so interferes with the
> ability for system() to determine a command's exit status.
> 
> Setting up a handler for SIGCHLD will not work either, since xfsdump is
> now multi-threaded and the main thread (which handles signals) might
> handle a child exit before the thread running system() can.
> 
> I also attempted to use waitpid() when tearing down a librmt session,
> but this has the potential to block indefinitely if there is a problem
> on the remote side. (And using WNOHANG tended to never catch the exit.)
> 
> In the end, I settled on just not touching SIGCHLD at all. There may be
> a zombie rsh when librmt is used, but typically it will be alive until
> the end of the backup and in any case will be cleaned up when
> xfsdump/restore exits.
> 
> Signed-off-by: Bill Kendall <wkendall@sgi.com>

Looks OK to me.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2012-01-11 22:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-10  2:42 xfsdump 3.0.6, ERROR: xfs_quota failed with exit status: -1 Tommy Wu
2012-01-11 14:53 ` Bill Kendall
2012-01-11 21:07 ` [PATCH] xfsdump: allow system() to obtain exit status Bill Kendall
2012-01-11 22:20   ` Dave Chinner [this message]

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=20120111222036.GK24410@dastard \
    --to=david@fromorbit.com \
    --cc=wkendall@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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