Re: [PATCH 5/7] Trap SIGBUS to handle truncated shared memory segments

2013-11-12 Thread Keith Packard
Mark Kettenis writes: > Proper spelling of MAP_ANONYMOUS is MAP_ANON. The former doesn't > exist on BSD and the latter is available everywhere AFAIK (checked > Solaris and Linux). > > You also might want to wrap that line ;). I've changed the spelling and wrapped the line, merging the result t

Re: [PATCH 5/7] Trap SIGBUS to handle truncated shared memory segments

2013-11-08 Thread Mark Kettenis
> From: Adam Jackson > Date: Fri, 08 Nov 2013 12:54:21 -0500 > > On Thu, 2013-11-07 at 12:15 -0800, Keith Packard wrote: > > If a client passes a section of memory via file descriptor and then > > subsequently truncates that file, the underlying pages will be freed > > and the addresses invalidat

Re: [PATCH 5/7] Trap SIGBUS to handle truncated shared memory segments

2013-11-08 Thread Mark Kettenis
> From: Keith Packard > Date: Thu, 7 Nov 2013 12:15:58 -0800 > > If a client passes a section of memory via file descriptor and then > subsequently truncates that file, the underlying pages will be freed > and the addresses invalidated. Subsequent accesses to the page will > fail with a SIGBUS e

Re: [PATCH 5/7] Trap SIGBUS to handle truncated shared memory segments

2013-11-08 Thread Adam Jackson
On Thu, 2013-11-07 at 12:15 -0800, Keith Packard wrote: > If a client passes a section of memory via file descriptor and then > subsequently truncates that file, the underlying pages will be freed > and the addresses invalidated. Subsequent accesses to the page will > fail with a SIGBUS error. > >

[PATCH 5/7] Trap SIGBUS to handle truncated shared memory segments

2013-11-07 Thread Keith Packard
If a client passes a section of memory via file descriptor and then subsequently truncates that file, the underlying pages will be freed and the addresses invalidated. Subsequent accesses to the page will fail with a SIGBUS error. Trap that SIGBUS, figure out which segment was causing the error an