diff --git a/src/lsp/Main.re b/src/lsp/Main.re index f5ec54ca..22c96446 100644 --- a/src/lsp/Main.re +++ b/src/lsp/Main.re @@ -301,6 +301,7 @@ let showHelp = () => { }; let main = () => { + Sys.set_signal(Sys.sigpipe, Sys.Signal_ignore); switch (parseArgs(Sys.argv->Belt.List.fromArray)) { | (opts, _) when opts->hasOpts(["-h", "--help"]) => showHelp(); | (opts, []) => diff --git a/util/Commands.re b/util/Commands.re index e2fbe25d..7730991d 100644 --- a/util/Commands.re +++ b/util/Commands.re @@ -34,7 +34,7 @@ let execFull = (~input=?, ~pwd=?, ~env=Unix.environment(), cmd) => { | None => () | Some(text) => output_string(cmd_in, text) }; - close_out(cmd_in); + close_out_noerr(cmd_in); let cmd_out_descr = Unix.descr_of_in_channel(cmd_out); let cmd_err_descr = Unix.descr_of_in_channel(cmd_err);