
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Turn a node script into a daemon.
npm install daemon
Requires node >= 0.8
// this code is run twice
// see implementation notes below
console.log(process.pid);
// after this point, we are a daemon
require('daemon')();
// different pid because we are now forked
// original parent has exited
console.log(process.pid);
Respawn the process (self) as a daemon. The parent process will exit at the point of this call.
Spawn the script
with given args
array as a daemonized process. Return the child
process object.
opt can optionally contain the following arguments:
Daemon actually re-spawns the current application and runs it again. The only difference between the original and the fork is that the original will not execute past the daemon()
call whereas the fork will.
Using this module on older versions of node (or older versions of this module) are not recommended due to how node works internally and the issues it can cause for daemons.
Charlie Robbins
Pedro Teixeira
James Halliday
Zak Taylor
Daniel Bartlett
Charlie McConnell
Slashed
Roman Shtylman
FAQs
Add-on for creating *nix daemons
The npm package daemon receives a total of 32,947 weekly downloads. As such, daemon popularity was classified as popular.
We found that daemon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.