Skip to content

Avoid killing mill daemon if Ctrl-C interrupt occurs during file-watching mode #327

@lihaoyi

Description

@lihaoyi

Currently, we kill the Mill daemon every time you Ctrl-C on the Mill client, as we do not want a useless background daemon running forever unnecessarily and we also cannot trust the JVM not to fall into a bad state using Thread.stop to interrupt the computation (in Ammonite the JVM does fall into a bad state sometimes, but since it's an interactive repl it's much easier to notice/remedy than if the Mill background daemon did the same).

However, once Mill has completed running it's task and is in --watch/-w mode, Ctrl-C should allow the Mill client to exit without killing the Mill server, since the watch loop should be trivially stop-able. That would avoid paying the cost of spinning up a new JVM every time you exit --watch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions