fix: close process handle after termination (#1856)
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user