Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pty: 1 かつ out_io と err_io が file または null の設定でジョブを起動すると、ジョブが即座に終了する。
pty: 1
out_io
err_io
file
null
vim --clean
call term_start('sleep 10', {'out_io':'null', 'err_io':'null'})
unix系OS
channel の out と err が両方とも閉じられると、その後 in も閉じられる。 out_io と err_io が file または null のとき、これらのfdは直接ジョブのプロセスにつながる (Vimはハンドリングしない) ので、channel の out と err はどちらも閉じられた状態で起動する。 よって、すぐ in が閉じられるが、in が pty のときは in はプロセスの制御端末であるため、閉じた時点でカーネルからプロセスにSIGHUPが送られる。
The text was updated successfully, but these errors were encountered:
https://github.com/vim/vim/compare/master...ichizok:fix/job-on-pty.diff
isatty(in) のときには in にも channel->ch_to_be_closed |= (1 << PART_IN); をセットして閉じないようにしておき、ジョブ終了後に閉じる。 ただし、out と err が閉じられていると channel の監視が回らないため、現状 statusline を更新する契機がない。
isatty(in)
channel->ch_to_be_closed |= (1 << PART_IN);
Sorry, something went wrong.
has_pending_job() の判定内容を変更して、監視が回るようにした。 vim/vim#2734
has_pending_job()
todolisted https://github.com/vim/vim/blob/ab943431d8fcd856008a025b0e5652dd4b8007fc/runtime/doc/todo.txt#L69
8.0.1761 vim/vim@4e9d443
No branches or pull requests
質問・報告の内容
pty: 1
かつout_io
とerr_io
がfile
またはnull
の設定でジョブを起動すると、ジョブが即座に終了する。vim --clean
OSの種類/ディストリ/バージョン
unix系OS
原因
channel の out と err が両方とも閉じられると、その後 in も閉じられる。
out_io
とerr_io
がfile
またはnull
のとき、これらのfdは直接ジョブのプロセスにつながる (Vimはハンドリングしない) ので、channel の out と err はどちらも閉じられた状態で起動する。よって、すぐ in が閉じられるが、in が pty のときは in はプロセスの制御端末であるため、閉じた時点でカーネルからプロセスにSIGHUPが送られる。
The text was updated successfully, but these errors were encountered: