vtest: Add option to catch and return child process exit status
This commit is based on !108 (merged) and a part of my work to get dEQP/Volt to launch and monitor vtest for crashes as can currently be lost. And a vtest crash is in most cases also a VM crash.
Cheers, Jakob.
Merge request reports
Activity
added feature label
added 39 commits
-
0cea07b5...c21a53de - 37 commits from branch
virgl:master
- f30b4ee3 - vtest: Refactor argument parsing to use getopt
- 99b3ce41 - vtest: Add option to catch and return child process exit status
-
0cea07b5...c21a53de - 37 commits from branch
177 static void handler_sigchld(int sig, siginfo_t *si, void *unused) 170 178 { 171 (void)sig; (void)si, (void)unused; 179 int wstat, exit_status; 180 pid_t pid; 172 181 173 printf("SIGSEGV!\n"); 174 exit(EXIT_FAILURE); 182 (void)si, (void)unused; 183 184 if (sig != SIGCHLD) { 185 printf("Caught wrong signal?!\n"); 186 exit(EXIT_FAILURE); 187 } 188 189 pid = wait3(&wstat, WNOHANG, NULL); Should we use wait3?
These functions are obsolete; use waitpid(2) or waitid(2) in new programs.
Edited by Gurchetan Singh
170 178 { 171 (void)sig; (void)si, (void)unused; 179 int wstat, exit_status; 180 pid_t pid; 172 181 173 printf("SIGSEGV!\n"); 174 exit(EXIT_FAILURE); 182 (void)si, (void)unused; 183 184 if (sig != SIGCHLD) { 185 printf("Caught wrong signal?!\n"); 186 exit(EXIT_FAILURE); 187 } 188 189 pid = wait3(&wstat, WNOHANG, NULL); 190 if (pid == 0) { added waiting-for-changes label