Skip to content

Commit f1a6039

Browse files
themiswangncooke3
authored andcommitted
Revert "Add SIGTERM support (#12881)" (#13162)
Co-authored-by: Nick Cooke <[email protected]>
1 parent 0318934 commit f1a6039

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

Crashlytics/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 10.28.1
2+
- [changed] Reverted "Add SIGTERM support (#12881)" (#13117)
3+
14
# 10.28.0
25
- [fixed] Created a new queue for rollouts persistence writes and made sure rollouts logging queue is not nil while dispatching (#12913).
36

Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,6 @@ - (NSString *)getSignalName:(NSNumber *)signalCode {
438438
return @"SIGSYS";
439439
case SIGTRAP:
440440
return @"SIGTRAP";
441-
case SIGTERM:
442-
return @"SIGTERM";
443441
default:
444442
return @"UNKNOWN";
445443
}

Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ exception_mask_t FIRCLSMachExceptionMaskForSignal(int signal) {
150150
return EXC_MASK_CRASH;
151151
case SIGFPE:
152152
return EXC_MASK_ARITHMETIC;
153-
case SIGTERM:
154-
return EXC_MASK_CRASH;
155153
}
156154

157155
return 0;

Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,8 @@
2121
#include <stdlib.h>
2222

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

3627
#if CLS_USE_SIGALTSTACK
3728
static void FIRCLSSignalInstallAltStack(FIRCLSSignalReadContext *roContext);
@@ -246,9 +237,6 @@ void FIRCLSSignalNameLookup(int number, int code, const char **name, const char
246237
case SIGTRAP:
247238
*name = "SIGTRAP";
248239
break;
249-
case SIGTERM:
250-
*name = "SIGTERM";
251-
break;
252240
default:
253241
*name = "UNKNOWN";
254242
break;

Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
#endif
3131

3232
#if CLS_SIGNAL_SUPPORTED
33-
// keep in sync with the list in _FIRCLSFatalSignals_.
34-
#define FIRCLSSignalCount (8)
33+
#define FIRCLSSignalCount (7)
3534

3635
typedef struct {
3736
const char* path;

0 commit comments

Comments
 (0)