Skip to content

cleanup non-persistent processes on exit #11

Open

Description

@43081j

if a process is executed with persist: false (default), we should probably forcefully kill it on exit of the parent process.

this won't be as simple as process.on('exit', onExit) since some things won't fire an exit event (but may fire signal events).

we probably just need to listen on exit and some common signals like SIGTERM.

Activity

  1. jbolda commented on Jul 2, 2024

    @jbolda

    We have some prior work that may be of value here. These two functions cover posix and even Windows with an attempted graceful shutdown through ctrlc-windows.

  2. 43081j commented on Dec 4, 2026

    @43081j
    MemberAuthor

    after revisiting this, i'm actually wondering if we should close this.

    it seems more sensible to give the functionality to something like tinyps. e.g. introduce a killOnExit or something to tinyps.

    as seen in #206, its a lot of extra code to add to tinyexec which actually isn't tinyexec's job really.

    cc @Boulea7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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