linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6-test6: nanosleep+SIGCONT weirdness
@ 2003-11-08 17:46 Denis
  2003-11-08 18:28 ` Linus Torvalds
  2003-11-08 18:43 ` Anton Blanchard
  0 siblings, 2 replies; 11+ messages in thread
From: Denis @ 2003-11-08 17:46 UTC (permalink / raw)
  To: linux-kernel

I observe some strange behaviour in 2.6-test6 with this small program:

n.c
===
#include <sys/time.h>
#include <errno.h>
int main(int argc, char* argv[]) {
    struct timespec t = { 5000,0};
    while(nanosleep(&t,&t)<0) {
        puts("Yeah");
        if(errno!=EINTR) break;
    }
    return 0;
}

In 2.4 stracing it while doing killall -CONT ./n works fine:

# strace ./n
execve("./n", ["./n", "5000"], [/* 23 vars */]) = 0
nanosleep({5000, 0}, 0xbffffd54)        = -1 EINTR (Interrupted system 
call)
--- SIGCONT (Continued) ---
write(1, "Yeah", 4Yeah)                     = 4
write(1, "\n", 1
)                       = 1
nanosleep({4994, 730000000}, 0xbffffd54) = -1 EINTR (Interrupted system 
call)
--- SIGCONT (Continued) ---
write(1, "Yeah", 4Yeah)                     = 4
write(1, "\n", 1
)                       = 1
nanosleep({4994, 280000000}, 0xbffffd54) = -1 EINTR (Interrupted system 
call)
--- SIGCONT (Continued) ---
write(1, "Yeah", 4Yeah)                     = 4
write(1, "\n", 1
)                       = 1
nanosleep({4993, 930000000}, 

But in 2.6 it does this:

# strace ./n
execve("./n", ["./n", "400"], [/* 26 vars */]) = 0
nanosleep({5000, 0}, 0xbffffc44)        = -1 ERRNO_516 (errno 516)
--- SIGCONT (Continued) ---
setup()                                 = -1 EFAULT (Bad address)
--- SIGCONT (Continued) ---
write(1, "Yeah", 4Yeah)                     = 4
write(1, "\n", 1
)                       = 1
_exit(0)                                = ?
-- 
vda

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

end of thread, other threads:[~2003-11-11 22:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-08 17:46 2.6-test6: nanosleep+SIGCONT weirdness Denis
2003-11-08 18:28 ` Linus Torvalds
2003-11-08 18:45   ` Linus Torvalds
2003-11-08 20:32     ` Denis
2003-11-09  8:18       ` Denis
2003-11-11 22:45     ` [PATCH] " George Anzinger
2003-11-08 18:43 ` Anton Blanchard
2003-11-08 18:56   ` Linus Torvalds
2003-11-08 19:18     ` Ulrich Drepper
2003-11-08 19:46       ` Linus Torvalds
2003-11-08 20:15     ` Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).