Skip to content

Exit Code and Signal can be undefined #751

@tsmaeder

Description

@tsmaeder

When starting a pty like so:

const terminal = spawn(
            command,
            (isWindows && options.commandLine) || options.args || [],
            options.options || {}
        );

        terminal.onExit(({ exitCode, signal }) => {
            console.log(`terminal:exitCode = ${exitCode}, signal =${signal}`);

and then later doing terminal.kill, I sometimes get terminal:exitCode = undefined, signal =undefined in the log. I belies this should never happen, right?

The problem appears on nodejs 20.18.1 on a windows-2019 github action runner. Locally, it seems to always work.

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