1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Fix root startup of libsyncthing.so binary

Call suOut.flush on starting the syncthing binary using root
Fixes issue https://github.com/syncthing/syncthing-android/issues/1005
This commit is contained in:
Catfriend1 2018-02-23 16:58:13 +01:00 committed by GitHub
parent 18075f7151
commit 6a31e9d78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,6 +394,8 @@ public class SyncthingRunnable implements Runnable {
// If we did not use exec, we would wait infinitely for the process to terminate (ret = process.waitFor(); in run()).
// With exec the whole process terminates when Syncthing exits.
suOut.writeBytes("exec " + TextUtils.join(" ", mCommand) + "\n");
// suOut.flush has to be called to fix issue - #1005 Endless loader after enabling "Superuser mode"
suOut.flush();
return process;
} else {
ProcessBuilder pb = new ProcessBuilder(mCommand);