Please put a #ifdef broken_system^Wwin32 / #endif around that.
    There is no advantage in wasting system calls on proper operating
    systems.

    - Sascha

On Wed, 24 Sep 2003, Ilia Alshanetsky wrote:

> iliaa         Wed Sep 24 19:39:15 2003 EDT
>
>   Modified files:
>     /php-src/ext/session      mod_files.c
>   Log:
>   Fixed bug #25070 (Don't forget to unlock session files on win32 before
>   closing them).
>
>   Regions should be locked only briefly and should be unlocked before
>   closing a file or exiting the program. On Win32 locked files that are
>   closed without being explicitly unlocked will be unlocked only when "system
>   resources become avaliable".
>
>
> Index: php-src/ext/session/mod_files.c
> diff -u php-src/ext/session/mod_files.c:1.91 php-src/ext/session/mod_files.c:1.92
> --- php-src/ext/session/mod_files.c:1.91      Tue Jun 10 16:03:36 2003
> +++ php-src/ext/session/mod_files.c   Wed Sep 24 19:39:14 2003
> @@ -16,7 +16,7 @@
>     +----------------------------------------------------------------------+
>   */
>
> -/* $Id: mod_files.c,v 1.91 2003/06/10 20:03:36 imajes Exp $ */
> +/* $Id: mod_files.c,v 1.92 2003/09/24 23:39:14 iliaa Exp $ */
>
>  #include "php.h"
>
> @@ -127,6 +127,7 @@
>  static void ps_files_close(ps_files *data)
>  {
>       if (data->fd != -1) {
> +             flock(data->fd, LOCK_UN);
>               close(data->fd);
>               data->fd = -1;
>       }
>
> --
> 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