Linked Questions

31 questions linked to/from How to exit in Node.js
0 votes
1 answer
516 views

Possible Duplicate: How to exit in Node.JS I'm using node.js to import some data in the background and I'll have the script running every other day in the background using cron. I don't need it to ...
jabbermonkey's user avatar
  • 1,830
95 votes
8 answers
214k views

I am getting a really weird JavaScript error when I run this code: <script type = 'text/javascript'> var ask = confirm(<?=json_encode($message, JSON_HEX_TAG); ?>); if (ask == false) { ...
imulsion's user avatar
  • 9,076
94 votes
3 answers
20k views

Node.js script won't exit if there's callbacks left in the main event loop. While one could forcefully terminate the script by calling process.exit() or throwing exceptions, it is recommended to let ...
KFL's user avatar
  • 18k
56 votes
3 answers
66k views

In node.js applications i saw usage of both these methods process.exit(1) and process.exit(0). Can anybody give me the exact answer ?
Devdutta Goyal's user avatar
43 votes
2 answers
36k views

How to kill all child processes (spawned using child_process.spawn) when node.js process exit?
Sirian's user avatar
  • 876
23 votes
3 answers
23k views

My script performs some asynchronous tasks using promises (with the q library). Running mocha tests works fine. However running the script from the command line does not. The node process immediately ...
21 votes
1 answer
5k views

How to exit in Deno passing a status code? In Node.js you could use process.exit(), what is its Deno's counterpart ?
5 votes
3 answers
6k views

Searching for help with peculiar issue. Each time I stop and restart the server, I get this message: Jim@Jim-PC MINGW64 ~/nodeProjects/express-locallibrary-tutorial $ npm start > express-...
JimB814's user avatar
  • 510
8 votes
2 answers
9k views

I'm trying to run "npm publish" from a gulp task. It works, but I want to handle any error that npm command itself throws. If I execute this code: var cmd = spawnSync('npm.cmd', ['publish', ...
Duke's user avatar
  • 155
8 votes
1 answer
18k views

I've been reading documentation and it's not explicitly stated whether the Node.js process immediately exits or not if no signal handler is registered. For example, are pending tasks in the poll queue ...
11 votes
3 answers
5k views

I have a node js process that creates a web3 websocket connection, like so: web3 = new Web3('ws://localhost:7545') When the process completes (I send it a SIGTERM), it does not exit, but rather hangs ...
4 votes
1 answer
3k views

Let me explain first what I mean by "exiting cleanly". If I have a nodejs app and I do setTimeout for a really long time, or if I open a socket connection that I don't close, then when I run that app ...
3 votes
2 answers
5k views

I am Totally new to Node.js, i have a node app running, but now i need to execute the node.js program without using command prompt atall. It maybe through winform app(using vb.net) or using javascript....
jeev's user avatar
  • 478
2 votes
1 answer
3k views

I am using Knex.js to insert values from an array into a PostgreSQL database. The problem I keep running into is that Knex will hang after inserting rows in the database. I've been struggling with ...
2 votes
1 answer
3k views

I found a lot of information about the node.js process.exit(), and different numbers are being passed. But I have a legacy project where they have used process.exit(-1) all over the codebase. I couldn'...
user avatar

15 30 50 per page
1
2 3