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

Merge pull request #1027 from Catfriend1/master

Fix root startup of libsyncthing.so binary
This commit is contained in:
Felix Ableitner 2018-02-24 03:17:21 +09:00 committed by GitHub
commit e2659f8480
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);