Merge "Use sleep_for for fsck timeout" am: 0777c5d604 am: 93c9dbe115

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2311079

Change-Id: Id9d6ce3801debeaa06d2338bd9a914b4105d7afc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-12-17 01:57:41 +00:00 committed by Automerger Merge Worker
commit 55f4d7442e

View file

@ -766,7 +766,7 @@ status_t ForkExecvpTimeout(const std::vector<std::string>& args, std::chrono::se
}
pid_t timer_pid = fork();
if (timer_pid == 0) {
sleep(timeout.count());
std::this_thread::sleep_for(timeout);
_exit(ETIMEDOUT);
}
if (timer_pid == -1) {