Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Process termination signal #1

@richardkazuomiller

Description

@richardkazuomiller

Hi! I just installed Code and first impressions are very good (^_^)

A problem I ran into is that stopping the process with Code uses the KILL (9) signal in terminateProcess.sh which kills the process immediately. My application listens for SIGINT/SIGTERM and stops servers and queues gracefully, but SIGKILL cannot be listened to so I can't do this when using the debugger. Would it be possible/easy to add an option to define how the process is killed or would it cause issues with the debugger if the process does not immediately die when the stop button is pressed?

For context, this is my code that handles exiting the process

var server = require('../lib/server') // an HTTP server
server.listen(8000)
process.on('SIGINT', function() {
  console.log('Got SIGINT.');
  server.close() //keeps the process alive until all connections are closed
});

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions