Skip to content

Commit cea9258

Browse files
committed
macOS has no execvpe
1 parent deeee6b commit cea9258

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kitty/child.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ spawn(PyObject *self UNUSED, PyObject *args) {
161161
if (has_preserved_fds) { for (int c = 3; c < 256; c++) { if (!FD_ISSET(c, &passed_fds)) safe_close(c, __FILE__, __LINE__); } }
162162
else for (int c = 3; c < 256; c++) { safe_close(c, __FILE__, __LINE__); }
163163

164-
execvpe(exe, argv, env);
164+
extern char **environ;
165+
environ = env;
166+
execvp(exe, argv);
165167
// Report the failure and exec kitten instead, so that we are not left
166168
// with a forked but not exec'ed process
167169
write_to_stderr("Failed to launch child: ");

0 commit comments

Comments
 (0)