Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-12 Thread Keith Packard
Mark Kettenis mark.kette...@xs4all.nl writes: 1. shm_open(3) is hard to use safely; it pretty much forces you to use mktemp(3) with all its traps. This is why some people suggested we need shm_mkstemp(3), and Ted Unangst actually implemented this on OpenBSD. The code under the ISC

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-11 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes: Possibly - I didn't know why Keith chose /run/shm in the first place. /run/shm was suggested by someone as a suitable new standard place to use instead, and it happened to work in Debian... I think the right plan will be to have configure.ac

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-11 Thread Mark Kettenis
From: Keith Packard kei...@keithp.com Date: Mon, 11 Nov 2013 11:04:58 -0800 Alan Coopersmith alan.coopersm...@oracle.com writes: Possibly - I didn't know why Keith chose /run/shm in the first place. /run/shm was suggested by someone as a suitable new standard place to use instead, and

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Mark Kettenis
From: Alan Coopersmith alan.coopersm...@oracle.com Date: Thu, 7 Nov 2013 20:55:44 -0800 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Makefile |9 + shmfd.c |4 2 files changed, 9 insertions(+), 4 deletions(-) Ah, is this the example code I have

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Thomas Klausner
On Fri, Nov 08, 2013 at 09:42:57AM -0500, Jasper St. Pierre wrote: We want to make sure we don't write files to disk. /tmp on some systems is backed by a disk, not tmpfs. If you want real temporary files that don't survive a reboot, /tmp is a better bet than /var/tmp. See e.g.

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Jasper St. Pierre
We want to make sure we don't write files to disk. /tmp on some systems is backed by a disk, not tmpfs. On Fri, Nov 8, 2013 at 2:53 AM, Mark Kettenis mark.kette...@xs4all.nlwrote: From: Alan Coopersmith alan.coopersm...@oracle.com Date: Thu, 7 Nov 2013 20:55:44 -0800 Signed-off-by: Alan

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Mark Kettenis
Date: Fri, 8 Nov 2013 09:42:57 -0500 From: Jasper St. Pierre jstpie...@mecheye.net We want to make sure we don't write files to disk. /tmp on some systems is backed by a disk, not tmpfs. And /run doesn't exist on many Linux systems. In the end this is just some test code, so I guess it

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Alan Coopersmith
On 11/ 8/13 06:42 AM, Jasper St. Pierre wrote: We want to make sure we don't write files to disk. /tmp on some systems is backed by a disk, not tmpfs. That was unclear from the sample code - all I saw was a directory that doesn't exist on my platform, with no hints how to pick the right one.

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-08 Thread Alan Coopersmith
On 11/ 7/13 11:53 PM, Mark Kettenis wrote: From: Alan Coopersmith alan.coopersm...@oracle.com Date: Thu, 7 Nov 2013 20:55:44 -0800 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Makefile |9 + shmfd.c |4 2 files changed, 9 insertions(+), 4

[PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-07 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Makefile |9 + shmfd.c |4 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e77f938..672979e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ -CFLAGS=-Wall -O0 -g

Re: [PATCH:shmfd 2/2] Use /var/tmp instead of /run/shm on non-linux OS'es

2013-11-07 Thread Alan Coopersmith
Whoops, didn't mean to include the makefile changes in that patch, just shmfd.c. -alan- On 11/ 7/13 08:55 PM, Alan Coopersmith wrote: Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Makefile |9 + shmfd.c |4 2 files changed, 9 insertions(+), 4