mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
More temporary mochitest hang diagnostics: kill the plugin process with SIGSEGV if it doesn't shut down within 30 seconds.
This commit is contained in:
parent
6ff062a712
commit
382bd97b0b
@ -122,14 +122,25 @@ protected:
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
HANDLE_EINTR(waitpid(process_, NULL, 0));
|
||||
#else
|
||||
|
||||
const int maxWaits = 30;
|
||||
int waits = 0;
|
||||
while (!IsProcessDead(process_) && ++waits < maxWaits)
|
||||
sleep(1);
|
||||
|
||||
|
||||
|
||||
printf("TEST-UNEXPECTED-FAIL | process %d done busy-waiting on | child process %d\n", getpid(), process_);
|
||||
|
||||
if (waits < maxWaits) {
|
||||
printf("TEST-UNEXPECTED-FAIL | process %d done busy-waiting on | child process %d\n", getpid(), process_);
|
||||
}
|
||||
else {
|
||||
printf("TEST-UNEXPECTED-FAIL | process %d wait on | child process %d timed out!\n", getpid(), process_);
|
||||
// kill the child in such a way that breakpad is triggered
|
||||
kill(process_, SIGSEGV);
|
||||
HANDLE_EINTR(waitpid(process_, NULL, 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user