summaryrefslogtreecommitdiff
path: root/rsCppUtils.h
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-03-25 17:21:40 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-03-25 18:16:26 -0700
commit2fa8a238dd69afebdeb757adcb1d674043d78e32 (patch)
tree4251f971d9e9bbf07587500830050ba8a78660a1 /rsCppUtils.h
parentbe8c89541d8b094d4a01a5539dac738003bf36cc (diff)
downloadrs-2fa8a238dd69afebdeb757adcb1d674043d78e32.tar.gz
Wrap TEMP_FAILURE_RETRY around system calls
BUG 19934827 Wrap TEMP_FAILURE_RETRY around system calls that can return EINTR (waitpid, close). Refactor fork/exec flows in various places into a utility function and log errors so we can better understand failures in the test server. Fix a small use-after-free issue in ScriptGroups. Change-Id: I60b192f83c395a13c27cd6bd2289c44132b84791
Diffstat (limited to 'rsCppUtils.h')
-rw-r--r--rsCppUtils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rsCppUtils.h b/rsCppUtils.h
index cc6d6cf6..7377a44c 100644
--- a/rsCppUtils.h
+++ b/rsCppUtils.h
@@ -283,6 +283,15 @@ static inline uint32_t rsBoxFilter8888(uint32_t i1, uint32_t i2, uint32_t i3, ui
const char* rsuJoinStrings(int n, const char* const* strs);
+#ifndef RS_COMPATIBILITY_LIB
+// Utility to fork/exec a command.
+// exe - Command to execute
+// nArgs - Number of arguments (excluding the trailing nullptr in args)
+// args - Arguments to the command
+bool rsuExecuteCommand(const char *exe, int nArgs, const char * const *args);
+#endif
+
+
}
}