Adjust run_command function

This commit is contained in:
topjohnwu
2017-07-10 22:29:53 +08:00
parent 3d43c3c5bc
commit d75fa62cab
6 changed files with 15 additions and 15 deletions

View File

@@ -749,7 +749,7 @@ void late_start(int client) {
"CLASSPATH=/system/framework/pm.jar "
"/system/bin/app_process /system/bin "
"com.android.commands.pm.Pm install -r " MANAGERAPK, NULL };
int apk_res = 0, pid;
int apk_res = -1, pid;
pid = run_command(1, &apk_res, "/system/bin/sh", command);
waitpid(pid, NULL, 0);
fdgets(buf, PATH_MAX, apk_res);