mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hardwired locking mechanism, somebody should fix it
This commit is contained in:
parent
9901e4b05e
commit
bd5233da8d
@ -10,7 +10,7 @@ from PyQt5.Qt import (
|
|||||||
|
|
||||||
from calibre import prints, plugins, force_unicode
|
from calibre import prints, plugins, force_unicode
|
||||||
from calibre.constants import (iswindows, __appname__, isosx, DEBUG, islinux,
|
from calibre.constants import (iswindows, __appname__, isosx, DEBUG, islinux,
|
||||||
filesystem_encoding, get_portable_base)
|
ishaiku, filesystem_encoding, get_portable_base)
|
||||||
from calibre.utils.ipc import gui_socket_address, RC
|
from calibre.utils.ipc import gui_socket_address, RC
|
||||||
from calibre.gui2 import (
|
from calibre.gui2 import (
|
||||||
initialize_file_icon_provider, Application, choose_dir,
|
initialize_file_icon_provider, Application, choose_dir,
|
||||||
|
@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
Secure access to locked files from multiple processes.
|
Secure access to locked files from multiple processes.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.constants import iswindows, __appname__, islinux, win32api, win32event, winerror, fcntl
|
from calibre.constants import iswindows, __appname__, islinux, ishaiku, win32api, win32event, winerror, fcntl
|
||||||
import time, atexit, os, stat, errno
|
import time, atexit, os, stat, errno
|
||||||
|
|
||||||
|
|
||||||
@ -228,6 +228,10 @@ elif islinux:
|
|||||||
fcntl.fcntl(fd, fcntl.F_SETFD, old_flags | fcntl.FD_CLOEXEC)
|
fcntl.fcntl(fd, fcntl.F_SETFD, old_flags | fcntl.FD_CLOEXEC)
|
||||||
atexit.register(sock.close)
|
atexit.register(sock.close)
|
||||||
return True
|
return True
|
||||||
|
elif ishaiku:
|
||||||
|
def singleinstance(name):
|
||||||
|
# Somebody should fix this.
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
def singleinstance_path(name):
|
def singleinstance_path(name):
|
||||||
home = os.path.expanduser('~')
|
home = os.path.expanduser('~')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user