Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2024, 04:03 PM   #1
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Gracefully shutdown KOReader

Hi again,

Is there a way to gracefully shutdown KOReader from the commandline ? I've noticed that SIGTERM or SIGKILL will stop the process, but it will not get a chance to save its settings.

Thanks
bitfreak is offline   Reply With Quote
Old 01-21-2024, 08:17 PM   #2
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Hi.

There's no way to exit (or interact in any way with a running instance) from commandline.

I'm not sure about the purpose but you can always patch the runtime to provide an interface over cli and use that to call Device.exit(). See https://github.com/koreader/koreader...tches#overview
pazos is offline   Reply With Quote
Advert
Old 01-22-2024, 03:34 PM   #3
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Koreader is running as a service, so when the service is stopped,so should koreader and that works, its just not saving the settings.
bitfreak is offline   Reply With Quote
Old 01-22-2024, 04:52 PM   #4
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by bitfreak View Post
Koreader is running as a service, so when the service is stopped,so should koreader and that works, its just not saving the settings.

I'm sorry. I thought you were asking a serious question.
pazos is offline   Reply With Quote
Old 01-22-2024, 08:04 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by pazos View Post
I'm not sure about the purpose but you can always patch the runtime to provide an interface over cli and use that to call Device.exit(). See https://github.com/koreader/koreader...tches#overview
I imagine you'd need an RPC àla https://github.com/koreader/koreader/pull/10223 to control an *existing* instance.

Quote:
Originally Posted by bitfreak View Post
Koreader is running as a service
Irrelevant, as process monitoring won't do shit if what's being monitored doesn't care about SIGHUP . (Spoiler: we don't).

(Also wrong on nearly every platform, the only platform which uses a very very very very thin "service" shim is rM, but that's a technicality, as it doesn't do shit besides fire a one-off script that isn't actually KOReader yet).

Last edited by NiLuJe; 01-22-2024 at 08:09 PM.
NiLuJe is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting KoReader plugins independent of KoReader jrw174 PocketBook Developer's Corner 0 08-13-2023 01:42 PM
Starting KOReader from CC works only if KOReader was not running before Norbi24 KOReader 7 09-24-2020 12:10 PM
Shutdown? Number9 Kobo Reader 1 08-14-2015 08:08 AM
PRS-T1 Shutdown Looping GeckoFriend Sony Reader 4 06-09-2015 08:49 PM
EPUB generated by ebook-convert does not open gracefully on windows Heritage History Calibre 4 07-08-2010 01:37 PM


All times are GMT -4. The time now is 02:46 AM.


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