[Sugar-devel] "Another osbuild instance is running" error

Shraddha Barke shraddha.6596 at gmail.com
Thu Dec 31 12:56:26 EST 2015



On Thu, 31 Dec 2015, James Cameron wrote:

> On Thu, Dec 31, 2015 at 03:38:02AM +0530, Shraddha Barke wrote:
>>> On Wed, Dec 30, 2015 at 04:30:17AM +0530, Shraddha Barke wrote:
>>>> I am trying to build sugar on Ubuntu 15.04 laptop. After git clone
>>>> and cd into sugar-build I get this error-Another osbuild instance is
>>>> running on executing ./osbuild pull
>>>> I searched the internet and found 2 such threads but the issue wasn't
>>>> resolved.
>>>
>>> There's more than two such threads on sugar-devel at .
>>>
>>>> Is this a bug that needs fixing?
>>>
>>> Yes, it's a bug in osbuild, please fix it.
>>
Hello James,
I made the following changes in check_lock()

def check_lock():
-    try:
-        fcntl.lockf(get_lock_file(), fcntl.LOCK_EX | fcntl.LOCK_NB)
-    except IOError:
-        return False
-
-    return True
-

+       pid = os.getpid()
+       try:
+            fcntl.lockf(pid, fcntl.LOCK_EX | fcntl.LOCK_NB)
+       except IOError:
+           return False
+       try:
+           os.kill(pid(), 0)
+       except OSError:
+            return False
+        return True

so that when there is no process running false is returned. However it is
not fixing the bug.
And yeah when I try to delete the lock file, I get 'file or directory 
doesn't exist'

Sorry for the novice questions :(

Kind Regards,
Shraddha

>
> -- 
> James Cameron
> http://quozl.netrek.org/
>


More information about the Sugar-devel mailing list