1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00
wezterm/pty
Wez Furlong 17dadbeb1e
pty: don't try to spawn a directory from the cwd
When the cwd was set to a directory that contained
an executable directory whose name matched the argv0
of the command to be spawned, we'd incorrectly consider
that to be a valid candidate.

When later trying to spawn this, we'll fail with an EACCESS,
and in the context of wezterm, rust's internal error handling
machinery for this error would fail to write to a descriptor
because our close_random_fds() function has closed that descriptor
during pre_exec.  That in turn would cause rust to print a panic
message to the output stream of this semi-spawned process,
which would show briefly an error message with no useful context.

This commit resolves this issue by explicitly avoiding executable
directories in this case.

refs: https://github.com/wez/wezterm/issues/4920
2024-02-01 17:18:42 -07:00
..
examples docs: add --help output pages to the CLI reference 2023-03-21 18:44:26 -07:00
src pty: don't try to spawn a directory from the cwd 2024-02-01 17:18:42 -07:00
Cargo.toml build(pty): don't use std::os::fd::RawFd symbol directly 2023-03-12 20:48:01 -07:00
LICENSE.md Add missing license files 2022-08-17 07:19:12 -07:00