In tmux, if I create a new window with tmux new-window vim
, then in vim
I launch a process (e.g. :!scite &
), then I exit vim
(e.g. with :q
), which will also close the tmux window, the launched process (scite
) is also killed. How can I prevent this?
Note that the process is not killed if I use tmux new-window
to create a new shell window first, then manually launch vim
, then do the rest, and exit the shell.
答案 0 :(得分:1)
您正在寻找的是tmux的remain-on-exit
选项。
来自new-window
命令:
当shell命令完成时,窗口关闭。见 保持退出选项以更改此行为。
set-remain-on-exit
doc:
set-remain-on-exit [on | off]
Set the remain-on-exit window option for any windows first created in this session. When this option is true, windows in which the running pro‐
gram has exited do not close, instead remaining open but inactivate. Use the respawn-window command to reactivate such a window, or the
kill-window command to destroy it.
答案 1 :(得分:0)
改为通过setsid
启动(例如:!setsid scite &
)。