Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        ecore_exe.c 


Log Message:


nuke fd leak on ecore_exe pipes! :)

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_exe.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- ecore_exe.c 7 May 2006 06:14:03 -0000       1.63
+++ ecore_exe.c 22 Jun 2006 19:49:00 -0000      1.64
@@ -432,7 +432,13 @@
                    {           /* Setup the error stuff. */
                       E_IF_NO_ERRNO(result,
                                     fcntl(exe->child_fd_error, F_SETFL,
-                                          O_NONBLOCK), ok)
+                                          O_NONBLOCK), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_error, F_SETFD,
+                                          FD_CLOEXEC), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_error_x, F_SETFD,
+                                          FD_CLOEXEC), ok);
                       {
                          exe->error_fd_handler =
                             ecore_main_fd_handler_add(exe->child_fd_error,
@@ -447,7 +453,13 @@
                    {           /* Setup the read stuff. */
                       E_IF_NO_ERRNO(result,
                                     fcntl(exe->child_fd_read, F_SETFL,
-                                          O_NONBLOCK), ok)
+                                          O_NONBLOCK), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_read, F_SETFD,
+                                          FD_CLOEXEC), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_read_x, F_SETFD,
+                                          FD_CLOEXEC), ok);
                       {
                          exe->read_fd_handler =
                             ecore_main_fd_handler_add(exe->child_fd_read,
@@ -462,7 +474,13 @@
                    {           /* Setup the write stuff. */
                       E_IF_NO_ERRNO(result,
                                     fcntl(exe->child_fd_write, F_SETFL,
-                                          O_NONBLOCK), ok)
+                                          O_NONBLOCK), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_write, F_SETFD,
+                                          FD_CLOEXEC), ok);
+                      E_IF_NO_ERRNO(result,
+                                    fcntl(exe->child_fd_write_x, F_SETFD,
+                                          FD_CLOEXEC), ok);
                       {
                          exe->write_fd_handler =
                             ecore_main_fd_handler_add(exe->child_fd_write,
@@ -841,7 +859,7 @@
    IF_FREE(exe->read_data_buf);
    IF_FREE(exe->error_data_buf);
    IF_FREE(exe->cmd);
-
+   
    exes = _ecore_list2_remove(exes, exe);
    ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE);
    IF_FREE(exe->tag);



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to