fix: send SIGTERM to job when trying to exit#125
Conversation
|
@jarun can you confirm if this fixes the |
|
And btw, this issue happens on |
|
Yes, it's fixed. However, I still see: |
Can't reproduce. Can you manually delete that file and see if the issue is reproducible on your end? |
|
It's a new file everytime. |
Fifo should be only created at Line 392 in d0f47ba We're creating this ourselves to avoid the sleep hack. I saw @luukvbaal do it on |
|
I put it in the |
|
I guess you should just put it at the top of |
|
We're deleting the fifo on explorer exit though. So don't think that should be the problem. I think maybe the fifo isn't getting deleted for some reason. Will have to look deeper into this. |
|
I don't see a leftover fifo in my tmp after I quit vim. After I open Explorer, with vi still open I can see the directory |
|
@jarun can try the following patch and see if that works? I think we need to create the fifo before calling diff --git a/autoload/nnn.vim b/autoload/nnn.vim
index a883d3e..660cb4d 100644
--- a/autoload/nnn.vim
+++ b/autoload/nnn.vim
@@ -385,11 +385,11 @@ function! nnn#explorer(...) abort
let l:opts.ppos = { 'buf': bufnr(''), 'win': winnr(), 'tab': tabpagenr() }
let l:On_exit = s:explorer_create_on_exit_callback(l:opts)
+ " create the fifo ourselves since otherwise nnn might not create it on time
+ execute 'silent !mkfifo '.s:explorer_fifo
let l:opts.term = s:build_window(l:layout, { 'cmd': l:cmd, 'on_exit': l:On_exit })
let b:tbuf = l:opts.term
- " create the fifo ourselves since otherwise nnn might not create it on time
- execute 'silent !mkfifo '.s:explorer_fifo
call s:explorer_job()
autocmd BufEnter <buffer> startinsert |
|
@N-R-K somehow I don't see the issue anymore so ignore it right now. If I see it again after reboot or something I will try this and update you. Thanks a lot for checking this out and the awesome Explorer mode!!! |
|
@jarun I can reproduce the issue now after adding a |
otherwise nnn might end up creating a fifo before us. Closes: mcchrish#125 (comment)
|
Awesome! |
otherwise nnn might end up creating a fifo before us. Closes: #125 (comment)
Fixes: #123 (comment)