-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
ts/nni_manager/main.ts
Outdated
process.on('SIGTERM', cleanUp); | ||
process.on('SIGBREAK', cleanUp); | ||
process.on('SIGINT', cleanUp); | ||
//not sure if 'SIGKILL' signal can be listened |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix it
@liuzhe-lz So change back to |
@@ -201,7 +188,11 @@ process.on(getStopSignal(), async () => { | |||
hasError = true; | |||
log.error(`${err.stack}`); | |||
} finally { | |||
await log.close(); | |||
log.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove await?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger.close()
is a sync function
On Windows SIGTERM does not trigger handler. It acts like SIGKILL in fact. |
No description provided.