Comparing version 2.2.0 to 2.3.0
@@ -74,3 +74,4 @@ var fork = require('child_process').fork | ||
child.respawn = true | ||
ipc.send({exit: true}, child) | ||
child.kill('SIGTERM') | ||
child.disconnect() | ||
} | ||
@@ -77,0 +78,0 @@ |
@@ -11,5 +11,8 @@ var path = require('path') | ||
// Listen for exit messages from the parent process | ||
ipc.on(process, 'exit', function() { | ||
process.exit() | ||
// Set NODE_ENV to 'development' unless already set | ||
if (!process.env.NODE_ENV) process.env.NODE_ENV = 'development' | ||
// Listen SIGTERM and exit unless there is another listener | ||
process.on('SIGTERM', function() { | ||
if (process.listeners('SIGTERM').length == 1) process.exit(0) | ||
}) | ||
@@ -48,6 +51,3 @@ | ||
//compatible with coffee-script 1.7+ | ||
if (scriptModule && scriptModule.register) scriptModule.register() | ||
// Execute the wrapped script | ||
require(main) |
{ | ||
"name": "node-dev", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Restarts your app when files are modified", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -110,3 +110,9 @@ [![Build Status](https://secure.travis-ci.org/fgnass/node-dev.png)](http://travis-ci.org/fgnass/node-dev) | ||
### Graceful restarts | ||
Node-dev sends a `SIGTERM` signal to the child-process if a restart is required. | ||
If your app is not listening for these signals `process.exit(0)` will be called | ||
immediately. If a listener is registered, node-dev assumes that your app will | ||
exit on its own once it is ready. | ||
## License | ||
@@ -113,0 +119,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19230
316
140
9