From: Matt Mackall <mpm@selenic.com>
To: George Anzinger <george@mvista.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: nanosleep interrupted by ignored signals
Date: Wed, 24 Nov 2004 19:06:27 -0800 [thread overview]
Message-ID: <20041125030627.GK2460@waste.org> (raw)
In-Reply-To: <41A54731.2040607@mvista.com>
On Wed, Nov 24, 2004 at 06:45:05PM -0800, George Anzinger wrote:
> Matt Mackall wrote:
> >Take the following trivial program:
> >
> >#include <unistd.h>
> >
> >int main(void)
> >{
> > sleep(10);
> > return 0;
> >}
> >
> >Run it in an xterm. Note that resizing the xterm has no effect on the
> >process. Now do the same with strace:
> >
> >brk(0x80495bc) = 0x80495bc
> >brk(0x804a000) = 0x804a000
> >rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
> >rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
> >rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> >nanosleep({10, 0}, 0xbffff548) = -1 EINTR (Interrupted system
> >call)
> >--- SIGWINCH (Window changed) ---
> >_exit(0) = ?
> >
> >In short, nanosleep is getting interrupted by signals that are
> >supposedly ignored when a process is being praced. This appears to be
> >a long-standing bug.
> >
> >It also appears to be a long-known bug. I found some old discussion of this
> >problem here but no sign of any resolution:
> >
> >http://www.ussg.iu.edu/hypermail/linux/kernel/0108.1/1448.html
> >
> >What's the current thinking on this?
>
> This should have been resolved with the 2.6 changes, in particular, the
> restart code. What kernel are you using?
Indeed it is. Forgot I still had 2.4 on the box in question, didn't
notice the restart bit when comparing the 2.6 code against the thread
above. Mea culpa.
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2004-11-25 3:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-24 21:35 nanosleep interrupted by ignored signals Matt Mackall
2004-11-25 2:45 ` George Anzinger
2004-11-25 3:06 ` Matt Mackall [this message]
2004-11-25 8:09 ` Marcelo Tosatti
2004-11-29 20:01 ` George Anzinger
2004-11-29 21:31 ` Marcelo Tosatti
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=20041125030627.GK2460@waste.org \
--to=mpm@selenic.com \
--cc=george@mvista.com \
--cc=linux-kernel@vger.kernel.org \
/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