From 18a1a61ec23be2e9309c2fa5e712a6d38cbc4b17 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Jan 2017 15:39:10 +0530 Subject: [PATCH] Dont use closerange() on OS X The original motivation for this was OpenGL problems caused by the glfw library on linux because of inherited file descriptors. Dont know if that applies on OS X. --- kitty/child.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitty/child.py b/kitty/child.py index b24135e25..811352913 100644 --- a/kitty/child.py +++ b/kitty/child.py @@ -9,7 +9,7 @@ import fcntl import signal from threading import Thread -from .constants import terminfo_dir +from .constants import terminfo_dir, isosx def remove_cloexec(fd): @@ -52,7 +52,8 @@ class Child: else: os.dup2(slave, i) os.close(slave), os.close(master) - os.closerange(3, 200) + if not isosx: # Apparently some OS X systemlibraries open file descriptors that cause EXC_GUARD crashes when closed + os.closerange(3, 200) # Establish the controlling terminal (see man 7 credentials) os.close(os.open(os.ttyname(1), os.O_RDWR)) os.environ['TERM'] = self.opts.term