diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch
index 0eebf8f..420d678 100644
--- a/SOURCES/openvswitch-3.1.0.patch
+++ b/SOURCES/openvswitch-3.1.0.patch
@@ -718,6 +718,89 @@ index 6cb4dae6d..129cbf6a1 100644
  
  /* Log functions. */
  struct vlog_module;
+diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c
+index bbb31ef27..7054f8e74 100644
+--- a/lib/fatal-signal.c
++++ b/lib/fatal-signal.c
+@@ -78,6 +78,39 @@ static void call_hooks(int sig_nr);
+ static BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType);
+ #endif
+ 
++/* Sets up a pipe or event handle that will be used to wake up the current
++ * process after signal is received, so it can be processed outside of the
++ * signal handler context in fatal_signal_run(). */
++static void
++fatal_signal_create_wakeup_events(void)
++{
++#ifndef _WIN32
++    xpipe_nonblocking(signal_fds);
++#else
++    wevent = CreateEvent(NULL, TRUE, FALSE, NULL);
++    if (!wevent) {
++        char *msg_buf = ovs_lasterror_to_string();
++        VLOG_FATAL("Failed to create a event (%s).", msg_buf);
++    }
++#endif
++}
++
++static void
++fatal_signal_destroy_wakeup_events(void)
++{
++#ifndef _WIN32
++    close(signal_fds[0]);
++    signal_fds[0] = -1;
++    close(signal_fds[1]);
++    signal_fds[1] = -1;
++#else
++    ResetEvent(wevent);
++    CloseHandle(wevent);
++    wevent = NULL;
++#endif
++}
++
++
+ /* Initializes the fatal signal handling module.  Calling this function is
+  * optional, because calling any other function in the module will also
+  * initialize it.  However, in a multithreaded program, the module must be
+@@ -94,15 +127,10 @@ fatal_signal_init(void)
+         inited = true;
+ 
+         ovs_mutex_init_recursive(&mutex);
+-#ifndef _WIN32
+-        xpipe_nonblocking(signal_fds);
+-#else
+-        wevent = CreateEvent(NULL, TRUE, FALSE, NULL);
+-        if (!wevent) {
+-            char *msg_buf = ovs_lasterror_to_string();
+-            VLOG_FATAL("Failed to create a event (%s).", msg_buf);
+-        }
+ 
++        fatal_signal_create_wakeup_events();
++
++#ifdef _WIN32
+         /* Register a function to handle Ctrl+C. */
+         SetConsoleCtrlHandler(ConsoleHandlerRoutine, true);
+ #endif
+@@ -456,6 +484,9 @@ do_unlink_files(void)
+  * hooks passed a 'cancel_cb' function to fatal_signal_add_hook(), then those
+  * functions will be called, allowing them to free resources, etc.
+  *
++ * Also re-creates wake-up events, so signals in one of the processes do not
++ * wake up the other one.
++ *
+  * Following a fork, one of the resulting processes can call this function to
+  * allow it to terminate without calling the hooks registered before calling
+  * this function.  New hooks registered after calling this function will take
+@@ -467,6 +498,9 @@ fatal_signal_fork(void)
+ 
+     assert_single_threaded();
+ 
++    fatal_signal_destroy_wakeup_events();
++    fatal_signal_create_wakeup_events();
++
+     for (i = 0; i < n_hooks; i++) {
+         struct hook *h = &hooks[i];
+         if (h->cancel_cb) {
 diff --git a/lib/learning-switch.c b/lib/learning-switch.c
 index 8102475ca..cdf42935c 100644
 --- a/lib/learning-switch.c
diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec
index 2799cc7..7a0977a 100644
--- a/SPECS/openvswitch3.1.spec
+++ b/SPECS/openvswitch3.1.spec
@@ -57,7 +57,7 @@ Summary: Open vSwitch
 Group: System Environment/Daemons daemon/database/utilities
 URL: http://www.openvswitch.org/
 Version: 3.1.0
-Release: 30%{?dist}
+Release: 31%{?dist}
 
 # Nearly all of openvswitch is ASL 2.0.  The bugtool is LGPLv2+, and the
 # lib/sflow*.[ch] files are SISSL
@@ -754,6 +754,12 @@ exit 0
 %endif
 
 %changelog
+* Fri Jun 09 2023 Open vSwitch CI <ovs-ci@redhat.com> - 3.1.0-31
+- Merging upstream branch-3.1 [RH git: d9cea495eb]
+    Commit list:
+    5fe322e169 fatal-signal: Don't share signal fds/handles with forked process.
+
+
 * Wed Jun 07 2023 Open vSwitch CI <ovs-ci@redhat.com> - 3.1.0-30
 - Merging upstream branch-3.1 [RH git: a29d6e27ae]
     Commit list: