diff options
| author | Quet Zal <4quetz@gmail.com> | 2022-04-30 13:33:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-30 12:33:15 +0200 |
| commit | a59ada7914640c6be66e9f729e4d620f181ab170 (patch) | |
| tree | 4afeac14dcad4a9991932171f63b37b15b583580 /lua | |
| parent | 8fe79f9d1df0edca3efa237020bc1f0ff81cb816 (diff) | |
fix: close process handle after termination (#1856)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/_.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lua/telescope/_.lua b/lua/telescope/_.lua index eaea824..6800c9e 100644 --- a/lua/telescope/_.lua +++ b/lua/telescope/_.lua @@ -53,9 +53,8 @@ function AsyncJob:close(force) self:_for_each_pipe(function(p) p:close(force) end) - if not self.handle:is_closing() then - self.handle:close() - end + + uv.process_kill(self.handle, "SIGTERM") log.debug "[async_job] closed" end @@ -67,6 +66,9 @@ M.spawn = function(opts) self.uv_opts, async.void(function() self:close(false) + if not self.handle:is_closing() then + self.handle:close() + end end) ) |
