All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/3] xfsqa: Fix signal usage in aio-dio test code
Date: Tue, 19 Jan 2010 04:18:06 -0500	[thread overview]
Message-ID: <20100119091806.GF29269@infradead.org> (raw)
In-Reply-To: <1263891792-30952-3-git-send-email-david@fromorbit.com>

On Tue, Jan 19, 2010 at 08:03:11PM +1100, Dave Chinner wrote:
> Using signal() to set up signal handlers doesn't always do what you
> want. A recent upgrade made test 208 fail because wait() was not
> getting interrupted by a SIGALRM. Tracing showed that signal() was
> being converted to a sigaction(SA_RESTART) handler, which allows
> syscalls that return ERESTARTSYS to immediately restart without
> returning EINTR to the calling process. The kernel code returns
> ERESTARTSYS to signal interruptions while in wait().
> 
> Replace the use of signal with sigaction() to ensure that the
> SA_RESTART flag is not set and the EINTR is delivered to the process
> sitting in wait().  This makes test 208 terminate at 200s again.

Yeah, signal is deprecated in favour of sigaction for a reason..


Reviewed-by: Christoph Hellwig <hch@lst.de>

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

  reply	other threads:[~2010-01-19  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19  9:03 [PATCH 0/3] xfsqa: Fix various test-suite related failures Dave Chinner
2010-01-19  9:03 ` [PATCH 1/3] xfsqa: update 214 golden output Dave Chinner
2010-01-19  9:17   ` Christoph Hellwig
2010-01-19  9:03 ` [PATCH 2/3] xfsqa: Fix signal usage in aio-dio test code Dave Chinner
2010-01-19  9:18   ` Christoph Hellwig [this message]
2010-01-19  9:03 ` [PATCH 3/3] xfsqa: xfs_check can see stale cached blocks Dave Chinner
2010-01-19  9:19   ` Christoph Hellwig

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=20100119091806.GF29269@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.