Unable to kill pty process on Windows
メンテナーはふだん 1 日以内に返信
@deepak1556 がすでに取り組んでいます。
2025年12月19日 から。
評価
この issue はまだ評価されていません。
説明
Environment details
- OS version: Windows 10 2004
- Node.js version: 14.15.0
- node-pty version: 0.9.0
Issue description
Using the simple example script below, I am unable to kill the pty process on Windows 10. However, I can successfully kill the pty process on Ubuntu with the same script and identical versions of Node.js and node-pty.
Test Script
Based on https://github.com/microsoft/node-pty/blob/master/examples/killDeepTree/index.js
var os = require('os');
var pty = require('node-pty');
var shell = process.platform === 'win32' ? 'powershell.exe' : 'bash';
var ptyProcess = pty.spawn(shell, [], {
name: 'xterm-color',
cols: 80,
rows: 30,
cwd: os.homedir(),
env: process.env
});
ptyProcess.onData((data) => process.stdout.write(data));
ptyProcess.write('ls\r');
setTimeout(() => {
console.log('Killing pty');
ptyProcess.kill();
}, 1000);
Output on Windows
The script hangs on the line "Killing pty" and never returns.
PS C:\Users\Timothy\Projects\test\node-pty-test> node index.js
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Timothy> ls
...
PS C:\Users\Timothy> Killing pty
Output on Ubuntu
The script finishes and returns to a prompt in the original directory.
timothy@timothy-Virtual-Machine:~/Desktop/node-pty-test$ node index.js
ls
timothy@timothy-Virtual-Machine:~$ ls
...
timothy@timothy-Virtual-Machine:~$ Killing pty
timothy@timothy-Virtual-Machine:~/Desktop/node-pty-test$
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 337
- 平均マージ
- 13時間 17分
- マージ済み PR(30日)
- 5
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/node-pty のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/node-pty#951 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
microsoft/node-pty の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
betagouv/mon-entreprise#4699 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jaegertracing/jaeger-ui#4547 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
linagora/twake-calendar-frontend#1467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
need4deed-org/sdk#267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
auth0/universal-login#414 ·
メンテナーはふだん 1 日以内に返信