Detach fd in replaceShellCommand()

This commit is contained in:
LoveSy 2021-09-19 13:14:41 +08:00 committed by GitHub
parent 024af644e6
commit 3480410262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ public class ActivityController extends IActivityController.Stub {
}
}.exec((Binder) am, in.getFileDescriptor(), out.getFileDescriptor(), err.getFileDescriptor(), args, shellCallback, resultReceiver);
if (in != null) in.detachFd();
if (out != null) out.detachFd();
if (err != null) err.detachFd();
return true;
}
} catch (Throwable e) {