Skip to content

Truly independent web browser

LibWebView: Don't save a crash report for a process stopped by SIGINT

Shannon Boothdbad9a4ce3af
diff --git a/Libraries/LibWebView/CrashReport.cpp b/Libraries/LibWebView/CrashReport.cpp
index f6ed976a3c1..b20330f6e57 100644
--- a/Libraries/LibWebView/CrashReport.cpp
+++ b/Libraries/LibWebView/CrashReport.cpp
@@ -159,7 +159,8 @@ static Optional<ByteString> recorded_build_description(int fd)
// launch that formats and stores it.
ErrorOr<void> CrashReport::save(int wait_status, ByteString const& path, Optional<UnixDateTime> crashed_at)
{
- if ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == 0) || (WIFSIGNALED(wait_status) && (WTERMSIG(wait_status) == SIGTERM || WTERMSIG(wait_status) == SIGKILL)))
+ // A process that was interrupted, asked to stop or killed did not crash.
+ if ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == 0) || (WIFSIGNALED(wait_status) && (WTERMSIG(wait_status) == SIGINT || WTERMSIG(wait_status) == SIGTERM || WTERMSIG(wait_status) == SIGKILL)))
return {};
auto crashed_time = crashed_at.value_or(UnixDateTime::now());