Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add SIGTERM support (#12881)" #13162

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
themiswang marked this conversation as resolved.
Show resolved Hide resolved
- [changed] Reverted "Add SIGTERM support (#12881)" (#13117)

# 10.28.0
- [fixed] Created a new queue for rollouts persistence writes and made sure rollouts logging queue is not nil while dispatching (#12913).

Expand Down
2 changes: 0 additions & 2 deletions Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ - (NSString *)getSignalName:(NSNumber *)signalCode {
return @"SIGSYS";
case SIGTRAP:
return @"SIGTRAP";
case SIGTERM:
return @"SIGTERM";
default:
return @"UNKNOWN";
}
Expand Down
2 changes: 0 additions & 2 deletions Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ exception_mask_t FIRCLSMachExceptionMaskForSignal(int signal) {
return EXC_MASK_CRASH;
case SIGFPE:
return EXC_MASK_ARITHMETIC;
case SIGTERM:
return EXC_MASK_CRASH;
}

return 0;
Expand Down
16 changes: 2 additions & 14 deletions Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,8 @@
#include <stdlib.h>

#if CLS_SIGNAL_SUPPORTED
static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {
SIGABRT, SIGBUS, SIGFPE, SIGILL,
SIGSEGV, SIGSYS, SIGTRAP,
// SIGTERM can be caught and is usually sent by iOS and variants
// when Apple wants to try and gracefully shutdown the app
// before sending a SIGKILL (which can't be caught).
// Some areas I've seen this happen are:
// - When the OS updates an app.
// - In some circumstances for Watchdog Events.
// - Resource overuse (CPU, Disk, ...).
SIGTERM};
static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {SIGABRT, SIGBUS, SIGFPE, SIGILL,
SIGSEGV, SIGSYS, SIGTRAP};

#if CLS_USE_SIGALTSTACK
static void FIRCLSSignalInstallAltStack(FIRCLSSignalReadContext *roContext);
Expand Down Expand Up @@ -246,9 +237,6 @@ void FIRCLSSignalNameLookup(int number, int code, const char **name, const char
case SIGTRAP:
*name = "SIGTRAP";
break;
case SIGTERM:
*name = "SIGTERM";
break;
default:
*name = "UNKNOWN";
break;
Expand Down
3 changes: 1 addition & 2 deletions Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
#endif

#if CLS_SIGNAL_SUPPORTED
// keep in sync with the list in _FIRCLSFatalSignals_.
#define FIRCLSSignalCount (8)
#define FIRCLSSignalCount (7)

typedef struct {
const char* path;
Expand Down
Loading