Re: strace, accept(), ERESTARTSYS and EINTR

From: Jiri Slaby
Date: Sat Jan 05 2008 - 12:02:57 EST


On 01/05/2008 04:03 PM, Andi Kleen wrote:
> if (!strcmp(current->comm, "yourprogramwithoutpath"))
> printk("%s:%d ERESTART\n", __FILE__, __LINE__);
>
> [the later two might need adding linux/string.h and/or linux/sched.h includes
> to the files if they don't compile]
>
> to all of them. Then recompile and boot that kernel.

If I'm not completely blind, there is no suspicous ERESTARTSYS in
PF_INET:SOCK_STREAM path.

Anyway even if it was returned by kernel syscall, glibc should put it in errno
and return -1 (since it is >= -4095 and < 0). He sees it in the accept retval.
Something rotten, probably broken/racy ?ntpl? implementation of syscalls or
somewhat?

regards,
--
Jiri Slaby
Faculty of Informatics, Masaryk University
Suse Labs

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