Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2017, 02:31 PM   #1
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 232
Karma: 100000
Join Date: Oct 2012
Device: Calibre
make calibre-server use a lock file?

I see there is an option to make calibre-server write the PID to a file. Is this PID a lockfile? If not, is there a way to make calibre-server use a lockfile so multiple instances cannot run?

(I run into this problem because I use initab to respawn calibre-server if it stops running, yet several instances are respawned.)
Geremia is offline   Reply With Quote
Old 01-18-2017, 09:02 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre-server is designed to run multiple instances so you can, for instance, serve different libraries on different ports. So no, the pidfile is not a lock file. It should be trivial to create a wrapper script that creates a lock file for you.
kovidgoyal is online now   Reply With Quote
Advert
Old 01-20-2017, 10:26 AM   #3
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 232
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by kovidgoyal View Post
It should be trivial to create a wrapper script that creates a lock file for you.
That's a good idea. thanks
I see people using flock.

However, I solved the problem even more easily by removing the "--daemonize" flag!

Last edited by Geremia; 01-20-2017 at 03:56 PM.
Geremia is offline   Reply With Quote
Reply

Tags
calibre-server

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Calibre Content Server to serve the original EPUBs cedhax Related Tools 4 02-23-2020 12:29 PM
500 Internal Server Error accessing content server Calibre 0.8.8 DaddyO57 Calibre 1 07-20-2012 06:08 PM
Calibre Content Server - file names r3mus Library Management 4 03-23-2012 03:30 AM
File lock for multiuser Calibre ??? rjalex Related Tools 11 04-22-2011 04:43 AM
Android lock your Edge with a password - all apps lock including Journals cheyennedonna enTourage Archive 11 01-03-2011 05:04 PM


All times are GMT -4. The time now is 01:53 AM.


MobileRead.com is a privately owned, operated and funded community.