Re: [PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Adam Jackson
On Mon, 2016-04-25 at 16:10 +0300, Pekka Paalanen wrote: > In the mean time, Marek's patch gets my > Reviewed-by: Pekka Paalanen > because it is an improvement for many (most?) systems. Yeah, looks good to me. remote: I: patch #83402 updated using rev

Re: [PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Ian Ray
On Mon, Apr 25, 2016 at 02:40:31PM +0200, Marek Chalupa wrote: > > On 04/25/16 12:20, Pekka Paalanen wrote: > > On Mon, 25 Apr 2016 11:33:00 +0200 > > Marek Chalupa wrote: > > > >> If posix_fallocate or ftruncate is interrupted by signal > >> while working, we return -1 as

Re: [PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Pekka Paalanen
On Mon, 25 Apr 2016 15:56:58 +0300 Ian Ray wrote: > On Mon, Apr 25, 2016 at 02:40:31PM +0200, Marek Chalupa wrote: > > > > On 04/25/16 12:20, Pekka Paalanen wrote: > > > On Mon, 25 Apr 2016 11:33:00 +0200 > > > Marek Chalupa wrote: > > > > > >> If

Re: [PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Marek Chalupa
On 04/25/16 12:20, Pekka Paalanen wrote: > On Mon, 25 Apr 2016 11:33:00 +0200 > Marek Chalupa wrote: > >> If posix_fallocate or ftruncate is interrupted by signal >> while working, we return -1 as fd and the allocation process >> returns BadAlloc error. That causes xwayland

Re: [PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Pekka Paalanen
On Mon, 25 Apr 2016 11:33:00 +0200 Marek Chalupa wrote: > If posix_fallocate or ftruncate is interrupted by signal > while working, we return -1 as fd and the allocation process > returns BadAlloc error. That causes xwayland clients to abort > with 'BadAlloc (insufficient

[PATCH xwayland] xwayland-shm: fortify fallocate against EINTR

2016-04-25 Thread Marek Chalupa
If posix_fallocate or ftruncate is interrupted by signal while working, we return -1 as fd and the allocation process returns BadAlloc error. That causes xwayland clients to abort with 'BadAlloc (insufficient resources for operation)' even when there's a lot of resources available. Fix it by