Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5767d0dd authored by Josh Gao's avatar Josh Gao
Browse files

adb: wait for restore to complete before returning.

If we return before waiting for the other side to finish, it'll get sent
SIGHUP.

Bug: http://b/27414382
Change-Id: I93514d2242ed0d7aa93a6ec6836270dc0783506d
(cherry picked from commit d26abed7)
parent 06c73ae9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1265,6 +1265,9 @@ static int restore(int argc, const char** argv) {
    printf("Now unlock your device and confirm the restore operation.\n");
    copy_to_file(tarFd, fd);

    // Wait until the other side finishes, or it'll get sent SIGHUP.
    copy_to_file(fd, STDOUT_FILENO);

    adb_close(fd);
    adb_close(tarFd);
    return 0;