Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit Code and Signal can be undefined #751

Closed
tsmaeder opened this issue Dec 31, 2024 · 1 comment
Closed

Exit Code and Signal can be undefined #751

tsmaeder opened this issue Dec 31, 2024 · 1 comment

Comments

@tsmaeder
Copy link

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.

tsmaeder added a commit to tsmaeder/theia that referenced this issue Dec 31, 2024
@tsmaeder
Copy link
Author

tsmaeder commented Jan 1, 2025

Updating the runner image to 2022 fixes the problem. I guess the old image is using winPty. Windows build number is 17763, I believe. (https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md)

@microsoft microsoft locked and limited conversation to collaborators Jan 6, 2025
@Tyriar Tyriar converted this issue into discussion #753 Jan 6, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant