Don't forgot to update the error message.

    - Sascha

On Mon, 4 Oct 2004, Anantha Kesari H Y wrote:

hyanantha               Mon Oct  4 04:52:57 2004 EDT

 Modified files:
   /php-src/ext/session mod_files.c
 Log:
 modified to 3rd argument of fcntl to FD_CLOEXEC


http://cvs.php.net/diff.php/php-src/ext/session/mod_files.c?r1=1.97&r2=1.98&ty=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.97 php-src/ext/session/mod_files.c:1.98 --- php-src/ext/session/mod_files.c:1.97 Thu Sep 30 10:23:51 2004 +++ php-src/ext/session/mod_files.c Mon Oct 4 04:52:53 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */

-/* $Id: mod_files.c,v 1.97 2004/09/30 14:23:51 hyanantha Exp $ */
+/* $Id: mod_files.c,v 1.98 2004/10/04 08:52:53 hyanantha Exp $ */

#include "php.h"

@@ -166,12 +166,7 @@
                        flock(data->fd, LOCK_EX);

#ifdef F_SETFD
-#ifdef NETWARE
-       /* NetWare LibC returns -1 upon error and upon success it returns non-zero 
unlike zero in other OSes*/
-                       if (fcntl(data->fd, F_SETFD, 1) == -1) {
-#else
-                       if (fcntl(data->fd, F_SETFD, 1)) {
-#endif
+                       if (fcntl(data->fd, F_SETFD, FD_CLOEXEC)) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "fcntl(%d, 
F_SETFD, 1) failed: %s (%d)", data->fd, strerror(errno), errno);
                        }
#endif

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to