You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running dune exec in watch mode (via dune exec -w <target>) and the target is an infinite process (e.g. a web server), a shutdown via signal (e.g. SIGINT) to the dune process should also forward the signal to the child process (<target>).
To be fair, this may be working as designed but I still wanted to raise this issue in case it's not.
Actual Behavior
Currently the signal terminates dune itself, leaving the target process orphaned.
Background
I've come across this issue as part of a dune integration into neovim. The editor plugin is doing some housekeeping and tracks all dune processes spawned during editing. Once they are not needed anymore the plugin stops those instances by sending SIGINT to the dune process leaving any running target process orphaned (as described above).
It would be great if dune could handle the cleanup of spawned child processes, otherwise I will need to fine some workaround with process groups, which are not very well supported in neovim 🫤 .
Reproduction
Create a dune project with a target that will not shut down by itself. E.g. a simple Dream service with bin/main.ml
Expected Behavior
When running dune exec in watch mode (via
dune exec -w <target>
) and the target is an infinite process (e.g. a web server), a shutdown via signal (e.g. SIGINT) to the dune process should also forward the signal to the child process (<target>
).To be fair, this may be working as designed but I still wanted to raise this issue in case it's not.
Actual Behavior
Currently the signal terminates dune itself, leaving the target process orphaned.
Background
I've come across this issue as part of a dune integration into neovim. The editor plugin is doing some housekeeping and tracks all dune processes spawned during editing. Once they are not needed anymore the plugin stops those instances by sending SIGINT to the dune process leaving any running target process orphaned (as described above).
It would be great if dune could handle the cleanup of spawned child processes, otherwise I will need to fine some workaround with process groups, which are not very well supported in neovim 🫤 .
Reproduction
bin/main.ml
dune exec -w bin/main.exe
kill -2 <dune_pid>
to stop the dune processSpecifications
dune
(output ofdune --version
): 3.16.0ocaml
(output ofocamlc --version
): 5.2.0Additional information
dune
with the--verbose
flag:The text was updated successfully, but these errors were encountered: