Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Emit SIGNUSR2 to signal restart to user code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored Oct 24, 2017
1 parent dd95f51 commit 14e4817
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/serve/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const listenMessage = require('./listen-message')
const getPort = require('./get-port')

module.exports = async ({ filename, pkg, cli, restarting }) => {
if (restarting) process.emit('SIGNUSR2')

const { userPort, port, inUse } = await getPort(cli)
const filepath = path.resolve(process.cwd(), filename)

Expand Down

0 comments on commit 14e4817

Please sign in to comment.