Skip to content

Commit

Permalink
Ensure next commands respect termination signals
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsinclair committed Nov 23, 2020
1 parent f637c8a commit 1028b6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/next/bin/next.ts
Expand Up @@ -104,6 +104,10 @@ if (typeof React.Suspense === 'undefined') {
)
}

// Make sure commands gracefully respect termination signals (e.g. from Docker)
process.on('SIGTERM', () => process.exit(0))
process.on('SIGINT', () => process.exit(0))

commands[command]().then((exec) => exec(forwardedArgs))

if (command === 'dev') {
Expand Down

0 comments on commit 1028b6f

Please sign in to comment.