fix: handle string nodejs signals (#55606)
## Fixing a bug
### What?
On these versions, SIGINT signals are `string`, exit callback recieves code `number`
### How?
We use code argument to quit process for `event`, and exit with code `0` for `SIGINT` and `SIGTERM` signals
Fixes #55605
Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>