Messages in this thread | | | From | Denis <> | Subject | 2.6-test6: nanosleep+SIGCONT weirdness | Date | Sat, 8 Nov 2003 19:46:28 +0200 |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |