Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1fd3ea

Browse files
authored
fix: kill SIGINT signal at man for marked --help (#3483)
1 parent9c8c82c commitb1fd3ea

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎bin/main.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ export async function main(nodeProcess) {
3535
consthelpText=awaitreadFile(resolve(__dirname,'../man/marked.1.md'),'utf8');
3636

3737
awaitnewPromise(res=>{
38-
spawn('man',[resolve(__dirname,'../man/marked.1')],options)
39-
.on('error',()=>{
40-
console.log(helpText);
41-
})
38+
constmanProcess=spawn('man',[resolve(__dirname,'../man/marked.1')],options);
39+
nodeProcess.on('SIGINT',()=>{
40+
manProcess.kill('SIGINT');
41+
});
42+
43+
manProcess.on('error',()=>{
44+
console.log(helpText);
45+
})
4246
.on('close',res);
4347
});
4448
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp