Fix a regression that caused kitty not to restore SIGPIPE after python nukes it when launching children. Affects bash which does not sanitize its signal mask.
Fixes #5500
This commit is contained in:
parent
fe2f3d9870
commit
bcd78c3940
@ -55,6 +55,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Wayland: Generate a XDG_ACTIVATION_TOKEN when opening URLs or running programs in the background via the launch action
|
- Wayland: Generate a XDG_ACTIVATION_TOKEN when opening URLs or running programs in the background via the launch action
|
||||||
|
|
||||||
|
- Fix a regression that caused kitty not to restore SIGPIPE after python nukes it when launching children. Affects bash which does not sanitize its signal mask. (:iss:`5500`)
|
||||||
|
|
||||||
|
|
||||||
0.26.2 [2022-09-05]
|
0.26.2 [2022-09-05]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -100,11 +100,14 @@ spawn(PyObject *self UNUSED, PyObject *args) {
|
|||||||
#if PY_VERSION_HEX >= 0x03070000
|
#if PY_VERSION_HEX >= 0x03070000
|
||||||
PyOS_AfterFork_Child();
|
PyOS_AfterFork_Child();
|
||||||
#endif
|
#endif
|
||||||
// See _Py_RestoreSignals in signalmodule.c for a list of signals python nukes
|
|
||||||
const struct sigaction act = {.sa_handler=SIG_DFL};
|
const struct sigaction act = {.sa_handler=SIG_DFL};
|
||||||
|
|
||||||
#define SA(which) if (sigaction(which, &act, NULL) != 0) exit_on_err("sigaction() in child process failed");
|
#define SA(which) if (sigaction(which, &act, NULL) != 0) exit_on_err("sigaction() in child process failed");
|
||||||
for (int si = 0; si < num_handled_signals; si++) { SA(handled_signals[si]); }
|
for (int si = 0; si < num_handled_signals; si++) { SA(handled_signals[si]); }
|
||||||
|
// See _Py_RestoreSignals in signalmodule.c for a list of signals python nukes
|
||||||
|
#ifdef SIGPIPE
|
||||||
|
SA(SIGPIPE)
|
||||||
|
#endif
|
||||||
#ifdef SIGXFSZ
|
#ifdef SIGXFSZ
|
||||||
SA(SIGXFSZ);
|
SA(SIGXFSZ);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user