Skip to content

expose signal that killed the process #28

Closed

Description

@SuperchupuDev
No description provided.

Activity

  1. 43081j commented on Aug 18, 2024

    @43081j
    Member

    this may be as simple as introducing a getter for signalCode which is a pass through to process.signalCode

  2. SuperchupuDev commented on Aug 19, 2024

    @SuperchupuDev
    Author

    thatd be nice, but i just noticed i worded the feature request wrong 😅 i meant more of exposing it when spawn errors get thrown but that can work too

  3. 43081j commented on Aug 19, 2024

    @43081j
    Member

    when a spawn fails, it won't be a signal but will be a regular JS exception (e.g. if the command doesn't exist)

    when the command does exist but exits for some reason, process.signalCode will tell you why

  4. shaurya703 commented on Sep 12, 2026

    @shaurya703
    Contributor

    This looks like it was resolved by #146, which landed both halves of what's discussed above:

    • ExecProcess.signalCode — the pass-through getter to process.signalCode suggested in the first comment (src/main.ts)
    • NonZeroExitError.signalCode, plus a The command ... was killed by the signal SIGTERM message — which covers the "expose it when the error is thrown" clarification

    Both are covered by tests in src/test/main_test.ts for the async and sync paths.

    Probably safe to close.

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