mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-10 17:53:23 +00:00
fork() before creating the main window so that we dont share any env/state/fds
This commit is contained in:
parent
1e04b8fdca
commit
0f4db0e91e
1 changed files with 2 additions and 2 deletions
|
|
@ -56,9 +56,7 @@ def run_app(opts, args):
|
|||
glfw.glfwMakeContextCurrent(window)
|
||||
glewInit()
|
||||
glfw.glfwSwapInterval(1)
|
||||
child = args.args or [pwd.getpwuid(os.geteuid()).pw_shell or '/bin/sh']
|
||||
boss = Boss(window, window_width, window_height, opts, args)
|
||||
fork_child(child, args.directory, opts)
|
||||
glfw.glfwSetFramebufferSizeCallback(window, boss.on_window_resize)
|
||||
boss.start()
|
||||
try:
|
||||
|
|
@ -91,6 +89,8 @@ def main():
|
|||
exec(args.cmd)
|
||||
return
|
||||
opts = load_config(args.config)
|
||||
child = args.args or [pwd.getpwuid(os.geteuid()).pw_shell or '/bin/sh']
|
||||
fork_child(child, args.directory, opts)
|
||||
glfw.glfwSetErrorCallback(on_glfw_error)
|
||||
enable_automatic_opengl_error_checking(False)
|
||||
if not glfw.glfwInit():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue