Add timeout protection while SDCard is checking for data
When fsck_msdos detects the problematic data, it will take a lot
of time. And it will lock the UI thread and cause the watchdog to
be triggered repeatedly.
To fix, Add a timeout mechanism to avoid locking the UI thread.
Issue: PRJ8901-1771
Issue: FP3-A11#183
Issue: FP3-A11#233
Change-Id: I7fceac9b096d033eac4827debb2bd4045cf6faf8
(cherry picked from commit 1a11ad62787c33e6f0ef5bd60d79d08034faef20)
(cherry picked from commit b80a4b6d5c3d58ceccdd3f7efc35e6f607e6a2b7)
diff --git a/Utils.h b/Utils.h
index 5351450..cdf89f3 100644
--- a/Utils.h
+++ b/Utils.h
@@ -105,6 +105,9 @@
status_t ForkExecvp(const std::vector<std::string>& args, std::vector<std::string>* output = nullptr,
security_context_t context = nullptr);
+status_t ForkExecvpTimeout(const std::vector<std::string>& args, std::vector<std::string>* output = nullptr,
+ security_context_t context = nullptr);
+
pid_t ForkExecvpAsync(const std::vector<std::string>& args);
/* Gets block device size in bytes */