Allow custom process listeners

- Added detection to allow custom listeners for SIGINT, SIGTERM and exit
- Added debug log when custom listeners are used