diff --git a/docs/changelog.rst b/docs/changelog.rst index d056879b7..0da69c8c3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,6 +25,8 @@ To update |kitty|, :doc:`follow the instructions `. - Wayland: Fix kitty being killed on some Wayland compositors if a hidden window has a lot of output (:iss:`2329`) +- BSD: Fix controlling terminal not being established (:pull:`2686`) + 0.17.4 [2020-05-09] -------------------- diff --git a/kitty/child.c b/kitty/child.c index c0bede074..54edc6908 100644 --- a/kitty/child.c +++ b/kitty/child.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include static inline char** serialize_string_tuple(PyObject *src) { @@ -93,7 +95,7 @@ spawn(PyObject *self UNUSED, PyObject *args) { // Establish the controlling terminal (see man 7 credentials) int tfd = open(name, O_RDWR); if (tfd == -1) exit_on_err("Failed to open controlling terminal"); -#ifdef TIOCSTTY +#ifdef TIOCSCTTY // On BSD open() does not establish the controlling terminal if (ioctl(tfd, TIOCSCTTY, 0) == -1) exit_on_err("Failed to set controlling terminal with TIOCSCTTY"); #endif