helix icon indicating copy to clipboard operation
helix copied to clipboard

[macOS M1] Terminal closing does not shut down helix process

Open nicholasjng opened this issue 3 years ago • 1 comments

Summary

Thanks for making this! I just took a first look at helix early this week, I like it so far. But I noticed that when opening tutor mode and closing the terminal, the hx process survives, and proceeds to max out a single CPU core.

As a consequence, I need to kill it separately after terminal shutdown. Is this known / intended behavior? Thanks in advance.

Reproduction Steps

hx --tutor
# close iTerm by clicking red button and reopen
top

results in:

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS
93204  hx           100.0 00:18.99 12/1   0    32    5169K  0B     0B     93204 1     running  *0[1]

Helix log

~/.cache/helix/helix.log
2022-10-11T15:31:12.794 helix_view::editor [ERROR] Failed to initialize the LSP for `source.toml` { cannot find binary path }
2022-10-12T10:05:28.255 helix_view::editor [ERROR] Failed to initialize the LSP for `source.cmake` { cannot find binary path }
2022-10-12T21:43:56.235 helix_view::editor [ERROR] Failed to initialize the LSP for `git.commitmsg` { LSP not defined }
2022-10-13T13:52:39.516 helix_view::editor [ERROR] Failed to initialize the LSP for `git.commitmsg` { LSP not defined }
2022-10-13T13:55:45.176 helix_view::editor [ERROR] Failed to initialize the LSP for `git.commitmsg` { LSP not defined }
2022-10-13T15:09:57.499 helix_view::editor [ERROR] Failed to initialize the LSP for `source.cmake` { cannot find binary path }
2022-10-13T17:06:22.140 helix_view::editor [ERROR] Failed to initialize the LSP for `git.commitmsg` { LSP not defined }

Platform

macOS

Terminal Emulator

iTerm2

Helix Version

helix 22.08.1 (66276ce6)

nicholasjng avatar Oct 14 '22 08:10 nicholasjng

What is the expectation here? Should helix periodically check if it's parent process still exist?

I see that vim still hangs around after closing a terminal window but then after a little while it exits. Maybe interesting to find out what logic is used there.

st3fan avatar Oct 23 '22 00:10 st3fan