mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[Kobo] Support USBMS exports (#6552)
* \o/ * Make sure the (debug) event log doesn't end up in the fd table of our child processes... Otherwise, it breaks USBMS. * Close suspicious fds in the Wi-Fi scripts To prevent any and all issues w/ USBMS down the road... * Minor USBMS UI tweaks * Always ask for confirmation to start on USBMS session on plug * Bump base https://github.com/koreader/koreader-base/pull/1161 https://github.com/koreader/koreader-base/pull/1162 https://github.com/koreader/koreader-base/pull/1163 https://github.com/koreader/koreader-base/pull/1165 https://github.com/koreader/koreader-base/pull/1167
This commit is contained in:
@@ -52,9 +52,15 @@ function Dbg:turnOn()
|
||||
return check
|
||||
end
|
||||
|
||||
--- @todo close ev.log fd for children
|
||||
-- create or clear ev log file
|
||||
self.ev_log = io.open("ev.log", "w")
|
||||
--- @note: On Linux, use CLOEXEC to avoid polluting the fd table of our child processes.
|
||||
--- Otherwise, it can be problematic w/ wpa_supplicant & USBMS...
|
||||
--- Note that this is entirely undocumented, but at least LuaJIT passes the mode as-is to fopen, so, we're good.
|
||||
if jit.os == "Linux" then
|
||||
self.ev_log = io.open("ev.log", "we")
|
||||
else
|
||||
self.ev_log = io.open("ev.log", "w")
|
||||
end
|
||||
end
|
||||
|
||||
function Dbg:turnOff()
|
||||
|
||||
Reference in New Issue
Block a user