Browse Source
fix(kernel): handle SIGTERM graceful shutdown
pull/5427/head
Nicolas Giard
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
server/index.js
|
@ -38,6 +38,9 @@ WIKI.kernel.init() |
|
|
// Register exit handler
|
|
|
// Register exit handler
|
|
|
// ----------------------------------------
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
process.on('SIGTERM', () => { |
|
|
|
|
|
WIKI.kernel.shutdown() |
|
|
|
|
|
}) |
|
|
process.on('SIGINT', () => { |
|
|
process.on('SIGINT', () => { |
|
|
WIKI.kernel.shutdown() |
|
|
WIKI.kernel.shutdown() |
|
|
}) |
|
|
}) |
|
|