Skip to content

Commit

Permalink
fix(cli): do not prevent SIGINT/SIGTERM before start
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed May 18, 2021
1 parent 726cd22 commit 632dc61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/koishi/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ const handleSignal = (signal: NodeJS.Signals) => {
app.parallel('exit', signal).finally(() => process.exit())
}

process.on('SIGINT', handleSignal)
process.on('SIGTERM', handleSignal)

template.set('deamon', {
exiting: '正在关机……',
restarting: '正在重启……',
Expand Down Expand Up @@ -243,6 +240,9 @@ app.start().then(() => {

process.send({ type: 'start', body: { autoRestart } })
createWatcher()

process.on('SIGINT', handleSignal)
process.on('SIGTERM', handleSignal)
}, handleException)

function loadDependencies(filename: string, ignored: Set<string>) {
Expand Down

0 comments on commit 632dc61

Please sign in to comment.