Skip to content

dune ps misses the CLI shim and task wrappers; no way to stop what it lists #46

Closed

Description

@zumbrunn

On a machine with ~45 stale dune processes, dune ps listed 19 as "port unknown — is lsof installed?" and missed the one server that was actually serving, started through the dune shim as cli.ts dev.

Problems

  • Matching only covers the generated main.ts dev|serve, not the CLI run directly (cli.ts dev|serve, jsr:@dune/core@x/cli serve) or deno task dev|serve wrappers.
  • A server's wrapper, re-exec child and esbuild workers are listed as separate instances.
  • A process that is running but not listening (hung or leftover) is reported as "port unknown".
  • No way to stop what it lists.

Direction

  • dune ps stays read-only and gets the matching/grouping/"not listening" fixes.
  • Stopping is a separate command, dune stop <pid> | --port <n> | --idle | --all (SIGTERM; --force for SIGKILL; asks first; a target is always required). Open to naming/UX feedback.

Implemented in #37 (docs: duneorg/dune-docs#12). The longer-term design (instance registry plus hang detection) is tracked in #42.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions