diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2012-12-07 11:05:02 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2012-12-07 11:05:02 +0000 |
commit | 1ea47d5c6bca4cc9e2fa1d0d6eec47c89920b794 (patch) | |
tree | 51e4ab98a62dedee3413c58496fd627af0e1d518 | |
parent | edb4f8151cac816720fbaf3a64c7ddab54c4b4db (diff) | |
download | eina-1ea47d5c6bca4cc9e2fa1d0d6eec47c89920b794.tar.gz |
eina,evas,ecore,eio: backport r80434.
SVN revision: 80436
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | src/lib/eina_mmap.c | 11 |
3 files changed, 24 insertions, 3 deletions
@@ -1,4 +1,4 @@ -]2011-01-29 Carsten Haitzler (The Rasterman) +2011-01-29 Carsten Haitzler (The Rasterman) 1.0.0 release @@ -358,9 +358,13 @@ 1.7.2 release -2012-11-29 Vincent Torri +2012-11-29 Vincent Torri * Do not use -pthread anymore, but instead pass _REENTRANT to the preprocessor and -lpthread to the linker. * On Solaris OS, -mt is passed by default and same flags than linux must be passed. + +2012-12-07 Cedric Bail + + * Don't leak fd after exec. @@ -1,4 +1,10 @@ -Eina 1.7.2 +Eina 1.7.3 + +Changes since Eina 1.7.2: +------------------------- + + * Fix Solaris build. + * Don't leak fd after exec. Changes since Eina 1.7.1: ------------------------- diff --git a/src/lib/eina_mmap.c b/src/lib/eina_mmap.c index 90809a2..1a43675 100644 --- a/src/lib/eina_mmap.c +++ b/src/lib/eina_mmap.c @@ -156,9 +156,20 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled) /* no zero page device - open it */ if (_eina_mmap_zero_fd < 0) { +#ifdef HAVE_EXECVP + int flags; +#endif + _eina_mmap_zero_fd = open("/dev/zero", O_RDWR); /* if we don;'t have one - fail to set up mmap safety */ if (_eina_mmap_zero_fd < 0) return EINA_FALSE; + +#ifdef HAVE_EXECVP + flags = fcntl(_eina_mmap_zero_fd, F_GETFD); + flags |= FD_CLOEXEC; + fcntl(_eina_mmap_zero_fd, F_SETFD, flags); +#endif + } /* set up signal handler for SIGBUS */ sa.sa_sigaction = _eina_mmap_safe_sigbus; |