wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.55k stars 785 forks source link

Closing pane/window always asks for confirmation with unix domains #4199

Open brandonchinn178 opened 1 year ago

brandonchinn178 commented 1 year ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230825-065909-b904ed76

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

The following happens with unix domains / multiplexer configured:

Closing a pane or window with just zsh running will still ask "Really kill this pane?"

I debugged a bit and found the parent process with ps $(ps -o ppid $$ | tail -1), and I see

/Applications/WezTerm.app/Contents/MacOS/wezterm-mux-server

Which probably fails the check here: https://github.com/wez/wezterm/blob/2c95b98447ac88e0327b84c725efc7b837bdbd75/mux/src/localpane.rs#L596

To Reproduce

No response

Configuration

return {
  unix_domains = {
    {
      name = 'unix',
    },
  },
  default_gui_startup_args = { 'connect', 'unix' },
}

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 1 year ago

Likely root cause is that a client pane has no local processes associated with it so we always hit this case:

https://github.com/wez/wezterm/blob/2c95b98447ac88e0327b84c725efc7b837bdbd75/mux/src/localpane.rs#L629