Re: [PATCH] Handle short reads and EINTR in lto-plugin/simple-object

2014-03-28 Thread Ian Lance Taylor
On Fri, Mar 28, 2014 at 6:30 AM, Richard Biener wrote: > > 2014-03-26 Richard Biener > > libiberty/ > * simple-object.c (simple_object_internal_read): Handle > EINTR and short reads. > > lto-plugin/ > * lto-plugin.c (process_symtab): Use simple_object_int

Re: [PATCH] Handle short reads and EINTR in lto-plugin/simple-object

2014-03-28 Thread Richard Biener
On Wed, 26 Mar 2014, Richard Biener wrote: > On March 26, 2014 4:51:58 PM CET, Ian Lance Taylor wrote: > >On Wed, Mar 26, 2014 at 8:38 AM, Richard Biener > >wrote: > >> > >> - got = read (descriptor, buffer, size); > >> - if (got < 0) > >> + do > >> { > >> - *errmsg = "read"; > >> -

Re: [PATCH] Handle short reads and EINTR in lto-plugin/simple-object

2014-03-26 Thread Richard Biener
On March 26, 2014 4:51:58 PM CET, Ian Lance Taylor wrote: >On Wed, Mar 26, 2014 at 8:38 AM, Richard Biener >wrote: >> >> - got = read (descriptor, buffer, size); >> - if (got < 0) >> + do >> { >> - *errmsg = "read"; >> - *err = errno; >> - return 0; >> + got = read (de

Re: [PATCH] Handle short reads and EINTR in lto-plugin/simple-object

2014-03-26 Thread Ian Lance Taylor
On Wed, Mar 26, 2014 at 8:38 AM, Richard Biener wrote: > > - got = read (descriptor, buffer, size); > - if (got < 0) > + do > { > - *errmsg = "read"; > - *err = errno; > - return 0; > + got = read (descriptor, buffer, size); > + if (got < 0 > + && errno !=

[PATCH] Handle short reads and EINTR in lto-plugin/simple-object

2014-03-26 Thread Richard Biener
The following tries to cure random plugin claim failures I see when building in KVM (still to be verified that this is the actual problem). It seems that lto-plugin and simple-object fail to handle short reads and read returning EINTR which the following fixes by teaching that to simple_object_int