Skip to content

Commit

Permalink
fix: close stderr in [run_in_directory] (#1349)
Browse files Browse the repository at this point in the history
Otherwise we're going to leak a file descriptor

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Aug 3, 2024
1 parent 45f5dda commit deb1aae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Unreleased

## Fixes

- Fix fd leak in running external processes for preprocessing (#1349)

# 1.19.0

## Features

- Add custom [`ocamllsp/getDocumentation`](/ocaml-lsp-server/docs/ocamllsp/getDocumentation-spec.md) request (#1336)
- Add support for OCaml 5.2 (#1233)

-
## Fixes

- Kill unnecessary ocamlformat processes with sigterm rather than sigint or
Expand Down
1 change: 1 addition & 0 deletions ocaml-lsp-server/src/ocaml_lsp_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ let run_in_directory ~prog ~prog_is_quoted:_ ~args ~cwd ?stdin ?stdout ?stderr (
in
Unix.close stdin;
if should_close_stdout then Unix.close stdout;
Option.iter stderr ~f:Unix.close;
`Finished res
;;

Expand Down

0 comments on commit deb1aae

Please sign in to comment.