Call closefrom after removing signals because newer libevent doesn't
authornicm <nicm@openbsd.org>
Sun, 9 Jul 2023 22:54:52 +0000 (22:54 +0000)
committernicm <nicm@openbsd.org>
Sun, 9 Jul 2023 22:54:52 +0000 (22:54 +0000)
like its signal fd being closed Azat Khuzhin.

usr.bin/tmux/spawn.c

index 3e67eae..aee6630 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: spawn.c,v 1.31 2022/08/10 14:03:59 nicm Exp $ */
+/* $OpenBSD: spawn.c,v 1.32 2023/07/09 22:54:52 nicm Exp $ */
 
 /*
  * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -415,8 +415,8 @@ spawn_pane(struct spawn_context *sc, char **cause)
                _exit(1);
 
        /* Clean up file descriptors and signals and update the environment. */
-       closefrom(STDERR_FILENO + 1);
        proc_clear_signals(server_proc, 1);
+       closefrom(STDERR_FILENO + 1);
        sigprocmask(SIG_SETMASK, &oldset, NULL);
        log_close();
        environ_push(child);