tst_safe_macros: Add SAFE_EXECVP()
PATCH 1/1 tst_safe_macros: Add SAFE_EXECVP()
Signed-off-by Petr Vorel <[email protected]>
---
Fix for Joerg's patch [1], deliberatelly using execvp() instead of execv() (more info at that patch).
Kind regards,
Petr
[1] https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
include/tst_safe_macros.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/tst_safe_macros.h +6 -0
@@ -487,6 +487,12 @@ int safe_sigwait(const char *file, const int lineno, "execl(%s, %s, ...) failed", file, arg); \ } while (0) +#define SAFE_EXECVP (file, arg) do { \ + execvp((file), (arg)); \ + tst_brk_(__FILE__, __LINE__, TBROK | TERRNO, \ + "execvp(%s, %p) failed", file, arg); \ + } while (0) +int safe_getpriority (const char *file,const int lineno,int which,id_t who);#define SAFE_GETPRIORITY (which, who) \ safe_getpriority(__FILE__, __LINE__, (which), (who))
Signature · 1 line
2.30.2