summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/osinit.c1
-rw-r--r--os/utils.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/os/osinit.c b/os/osinit.c
index 6cc040178..2eb1f7a8f 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -288,6 +288,7 @@ OsInit(void)
}
TimerInit();
OsVendorInit();
+ OsResetSignals();
/*
* No log file by default. OsVendorInit() should call LogInit() with the
* log file name if logging to a file is desired.
diff --git a/os/utils.c b/os/utils.c
index b50cbdbdf..a6f6ef549 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1242,6 +1242,19 @@ OsReleaseSignals(void)
#endif
}
+void
+OsResetSignals(void)
+{
+#ifdef SIG_BLOCK
+ while (BlockedSignalCount > 0)
+ OsReleaseSignals();
+#ifdef SIGIO
+ while (sigio_blocked > 0)
+ OsReleaseSIGIO();
+#endif
+#endif
+}
+
/*
* Pending signals may interfere with core dumping. Provide a
* mechanism to block signals when aborting.