public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* nanosleep interrupted by ignored signals
@ 2004-11-24 21:35 Matt Mackall
  2004-11-25  2:45 ` George Anzinger
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Mackall @ 2004-11-24 21:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: george anzinger

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?

-- 
Mathematics is the supreme nostalgia of our time.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-30 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-11-25  8:09     ` Marcelo Tosatti
2004-11-29 20:01       ` George Anzinger
2004-11-29 21:31         ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox