Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : epplets

Dir     : e16/epplets/api


Modified Files:
        epplet.c 


Log Message:
Fix instance counting bug (incorrect use of fcntl return code).

===================================================================
RCS file: /cvs/e/e16/epplets/api/epplet.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- epplet.c    11 Nov 2007 17:51:14 -0000      1.146
+++ epplet.c    11 Nov 2007 17:56:29 -0000      1.147
@@ -5727,7 +5727,7 @@
        for (;;)
          {
             err = fcntl(fd, F_SETLK, &fl);
-            if (err != EINTR)
+            if (err == 0 || errno != EINTR)
                break;
          }
        if (err == 0)
@@ -5735,6 +5735,11 @@
             /* Locking succeeded, file is open for writing */
             locked = 1;
             break;
+         }
+       if (errno == EACCES || errno == EAGAIN)
+         {
+            /* Locking failed due to held lock */
+            continue;
          }
 
        if (!exists)



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to