apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@ispol.com>
Subject [patch] proc_mutex_flock_child_init() should close the file
Date Thu, 16 Oct 2003 21:23:29 GMT

In proc_mutex_flock_child_init(), there is no reason to keep the inherited
file descriptor open, it results in unnecessary open files. Unless I'm
missing something it's ok to close it first thing in flock_child_init().
I've tested this on FreeBSD 4.8.

--- locks/unix/proc_mutex.c     6 Aug 2003 23:54:31 -0000       1.35
+++ locks/unix/proc_mutex.c     16 Oct 2003 21:18:48 -0000
@@ -682,6 +682,8 @@
     apr_proc_mutex_t *new_mutex;
     int rv;

+    apr_file_close((*mutex)->interproc);
+
     new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));

     memcpy(new_mutex, *mutex, sizeof *new_mutex);


Mime
View raw message