Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Mike Stump
On Oct 7, 2016, at 9:42 AM, Jack Howarth wrote: > > So using EINTR properly can be really tricky. I'd not phrase it that way. I'd phrase it as deferral can be tricky and choosing what action to do in a signal handler can be tricky. I don't mention deferral nor signal semantics, as these are s

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Mike Stump
On Oct 7, 2016, at 7:50 AM, Fritz Reese wrote: > what if a user wants/expects a system call to be interrupted? Then it is interrupted. > With the patch we would always restart the system call even if No, this is a misunderstanding on your part. The signal is delivered and delivered first then

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Mike Stump
On Oct 7, 2016, at 5:59 AM, Janne Blomqvist wrote: > > So I suppose in theory you could have a situation where something > continuously fires signals at the process, and the result is some kind > of race between the process restarting the syscall which then never > manages to complete before bein

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Mike Stump
On Oct 7, 2016, at 5:41 AM, FX wrote: > >> Many POSIX systems have the bad habit of not restarting interrupted >> syscalls. On these systems it's up to the user to check for an error >> with errno == EINTR and restart manually. This patch does this for >> libgfortran, so that GFortran users don't

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Jack Howarth
On Fri, Oct 7, 2016 at 12:09 PM, Janne Blomqvist wrote: > On Fri, Oct 7, 2016 at 5:50 PM, Fritz Reese wrote: >> On Fri, Oct 7, 2016 at 8:59 AM, Janne Blomqvist >> wrote: >>> On Fri, Oct 7, 2016 at 2:41 PM, FX wrote: > Many POSIX systems have the bad habit of not restarting interrupted >

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Janne Blomqvist
On Fri, Oct 7, 2016 at 5:50 PM, Fritz Reese wrote: > On Fri, Oct 7, 2016 at 8:59 AM, Janne Blomqvist > wrote: >> On Fri, Oct 7, 2016 at 2:41 PM, FX wrote: Many POSIX systems have the bad habit of not restarting interrupted syscalls. On these systems it's up to the user to check for an

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Fritz Reese
On Fri, Oct 7, 2016 at 8:59 AM, Janne Blomqvist wrote: > On Fri, Oct 7, 2016 at 2:41 PM, FX wrote: >>> Many POSIX systems have the bad habit of not restarting interrupted >>> syscalls. On these systems it's up to the user to check for an error >>> with errno == EINTR and restart manually. This pa

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Janne Blomqvist
On Fri, Oct 7, 2016 at 2:41 PM, FX wrote: >> Many POSIX systems have the bad habit of not restarting interrupted >> syscalls. On these systems it's up to the user to check for an error >> with errno == EINTR and restart manually. This patch does this for >> libgfortran, so that GFortran users don'

Re: [PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread FX
> Many POSIX systems have the bad habit of not restarting interrupted > syscalls. On these systems it's up to the user to check for an error > with errno == EINTR and restart manually. This patch does this for > libgfortran, so that GFortran users don't have to do it. I have not much experience wi

[PATCH, libgfortran] PR 67585 Handle EINTR

2016-10-07 Thread Janne Blomqvist
Many POSIX systems have the bad habit of not restarting interrupted syscalls. On these systems it's up to the user to check for an error with errno == EINTR and restart manually. This patch does this for libgfortran, so that GFortran users don't have to do it. 2016-10-07 Janne Blomqvist