Re: SIGCONT misbehaviour in Linux

Ulrich Drepper (drepper@cygnus.com)
08 Dec 1999 13:01:17 -0800


hpa@transmeta.com (H. Peter Anvin) writes:

> > Hmm...This works properly on libc5 systems, btw. (glibc2.0 and glibc2.1
> > use nanosleep(), libc5 uses alarm() and sigsuspend()).
> >
>
> It really could be argued what is the right behaviour here. When a
> system call is interrupted by the signal, the normal thing is to
> return EINTR.

Right. The problem is that the ptrace() call to continue the process
(which implicitly sends a SIGCONT) also wakes up the process. We have
a test program which, if you'd run it normally, would not finish in
aeons. If you run it under gdb with all the ptrace() calls to stop
and continue all the threads, it finishes. This change in behaviour
is not wanted nor can it be avoided by gdb without a kernel change.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/