Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: However, there's a lot of code and I know that there are bugs in it. I just want to focus on the kernel-related issue t

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andi Kleen wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: Many thanks for any suggestions. It's a long standing bug reported regularly Thanks for the re-assurance. but so far nobody has tracked it down. That's mostly because most people cannot really repro

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: However, there's a lot of code and I know that there are bugs in it. I just want to focus on the kernel-related issue that the strace fragment that I posted brings up: even if my user code gets completely

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Jiri Slaby wrote: On 01/05/2008 11:31 AM, Jiri Slaby wrote: Do not remove CCed people. On 01/05/2008 02:38 AM, Phil Endecott wrote: timezone go and play with http://demos.anyterm.org/bastet/anyterm.html while I sleep Service Temporarily Unavailable It failed at 0325 GMT thanks to the

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Frederik Deweerdt wrote: On Fri, Jan 04, 2008 at 09:01:38PM +, Phil Endecott wrote: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) { // [1] .report error and t

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Hi Jiri, Jiri Slaby wrote: On 01/04/2008 10:01 PM, Phil Endecott wrote: Dear Experts, I have some code like this: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) {

strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Dear Experts, I have some code like this: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) { // [1] .report error and terminate.. } int rc = fcntl(connfd,F_SETFD,FD_CLOEXE

Re: No error when inotify_add_watch(/an/NFS/file)

2007-11-24 Thread Phil Endecott
J. Bruce Fields wrote: On Fri, Nov 23, 2007 at 11:20:55PM +, Phil Endecott wrote: Dear Experts, NFS doesn't work with inotify (and it looks like it can't, certainly not before NFS v4.1). However, if I give an NFS filename to inotify_add_watch(), I don't get an error.

No error when inotify_add_watch(/an/NFS/file)

2007-11-23 Thread Phil Endecott
Dear Experts, NFS doesn't work with inotify (and it looks like it can't, certainly not before NFS v4.1). However, if I give an NFS filename to inotify_add_watch(), I don't get an error. If it indicated an error in this case then I could easily fall back to some sort of polling. Without an

Re: Subtleties of __attribute__((packed))

2006-12-06 Thread Phil Endecott
Jan Blunk wrote: Maybe the arm backend is somehow broken. AFAIK (and I verfied it on S390 and i386) the alignment shouldn't change. To see a difference with your example structs you need to compare these two: struct wibble1 { char c; struct bar1 b1; }; struct wibble2 { char c; struct

Re: Subtleties of __attribute__((packed))

2006-12-06 Thread Phil Endecott
Jan Blunck wrote: On 12/6/06, Phil Endecott <[EMAIL PROTECTED]> wrote: I used to think that this: struct foo { int a __attribute__((packed)); char b __attribute__((packed)); ... more fields, all packed ... }; was exactly the same as this: struct foo { int a;

Re: Subtleties of __attribute__((packed))

2006-12-06 Thread Phil Endecott
Frederik Deweerdt wrote: On Wed, Dec 06, 2006 at 01:20:41PM +, Phil Endecott wrote: I used to think that this: struct foo { int a __attribute__((packed)); char b __attribute__((packed)); ... more fields, all packed ... }; was exactly the same as this: struct foo { int a; char

Subtleties of __attribute__((packed))

2006-12-06 Thread Phil Endecott
Dear All, I used to think that this: struct foo { int a __attribute__((packed)); char b __attribute__((packed)); ... more fields, all packed ... }; was exactly the same as this: struct foo { int a; char b; ... more fields ... } __attribute__((packed)); but it is not, in a subtle