| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/3] xfsqa: Fix signal usage in aio-dio test code |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Tue, 19 Jan 2010 04:18:06 -0500 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1263891792-30952-3-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1263891792-30952-1-git-send-email-david@xxxxxxxxxxxxx> <1263891792-30952-3-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.19 (2009-01-05) |
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@xxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/3] xfsqa: update 214 golden output, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 3/3] xfsqa: xfs_check can see stale cached blocks, Christoph Hellwig |
| Previous by Thread: | [PATCH 2/3] xfsqa: Fix signal usage in aio-dio test code, Dave Chinner |
| Next by Thread: | [PATCH 0/3] random cleanups for 2.6.34, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |