You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
process.kill(process.pid,'SIGINT');// Let other SIGINT handlers run, if there are any
The code line above interferes with another optional handlers for "SIGINT"
by calling them a second time on the first time the signal appears.
This can lead into bugs if a node application depends on less-middleware
and registers handlers for "SIGINT" them self.
The following simulation shows,
that the code line is not needed for other handlers to receive the signal too:
Code used in the simulation:
// For closing the app after 5 secondssetTimeout(()=>process.exit(),5000);// Simulating handler added before include of less-middlewareletdefaultCounter=0;process.on("SIGINT",()=>{defaultCounter++;console.log("Default handler called "+defaultCounter+" times");});// Simulating handler of less-middlewareprocess.once("SIGINT",()=>{console.log("Once handler");// process.kill(process.pid, "SIGINT"); // The code interfering});// Simulating handler added after include of less-middlewareletsecondCounter=0;process.on("SIGINT",()=>{secondCounter++;console.log("Second default handler called "+secondCounter+" times");});
The text was updated successfully, but these errors were encountered:
less.js-middleware/lib/middleware.js
Line 71 in a9e0947
The code line above interferes with another optional handlers for "SIGINT"
by calling them a second time on the first time the signal appears.
This can lead into bugs if a node application depends on less-middleware
and registers handlers for "SIGINT" them self.
The following simulation shows,
that the code line is not needed for other handlers to receive the signal too:
Code used in the simulation:
The text was updated successfully, but these errors were encountered: