From f5132fa6eb71e96d9f0cd7148b186b324b142d15 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 27 Dec 2022 16:00:13 +0100 Subject: [PATCH] fix(notify_send): properly close file descriptors from spwaning notifysend --- lua/noice/view/backend/notify_send.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/noice/view/backend/notify_send.lua b/lua/noice/view/backend/notify_send.lua index d1e822c..9d06b81 100644 --- a/lua/noice/view/backend/notify_send.lua +++ b/lua/noice/view/backend/notify_send.lua @@ -96,13 +96,18 @@ function NotifySendView:_notify(msg) local out = "" local err = "" - vim.loop.spawn( + local proc + proc = vim.loop.spawn( "notify-send", { stdio = { nil, stdout, stderr }, args = args, }, vim.schedule_wrap(function(code, _signal) -- on exit + stdout:close() + stderr:close() + proc:close() + if code ~= 0 then return Util.error("notify-send failed: %s", err) else