rework --ignoreSigInt
Send it through the main signal handler so we can see resource stats and what was running at the time we got the SIGINT, and print an FYI note that we're ignoring it. Change-Id: Id3bee87d8d07c3ee74b5443198327b7b14d12ddf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201867 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
01f8de478c
commit
ca8087f466
13
dm/DM.cpp
13
dm/DM.cpp
@ -291,8 +291,13 @@ static void find_culprit() {
|
||||
#endif
|
||||
fflush(stdout);
|
||||
|
||||
signal(sig, previous_handler[sig]);
|
||||
raise(sig);
|
||||
if (sig == SIGINT && FLAGS_ignoreSigInt) {
|
||||
info("Ignoring signal %d because of --ignoreSigInt.\n"
|
||||
"This is probably a sign the bot is overloaded with work.\n", sig);
|
||||
} else {
|
||||
signal(sig, previous_handler[sig]);
|
||||
raise(sig);
|
||||
}
|
||||
}
|
||||
|
||||
static void setup_crash_handler() {
|
||||
@ -300,10 +305,6 @@ static void find_culprit() {
|
||||
for (int sig : kSignals) {
|
||||
previous_handler[sig] = signal(sig, crash_handler);
|
||||
}
|
||||
|
||||
if (FLAGS_ignoreSigInt) {
|
||||
signal(SIGINT, SIG_IGN);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user