- Version: all
- Platform: all
- Subsystem:
process
In the wake of #6456 I want to suggest to rename process.reallyExit() as it's name is poorly chosen. It was introduced in f6a7fe2 and imo doesn't fit the intention of the commit - the repo was young back then.
An adequate name would be os.exit() since the exit call is implemented by the OSes differently. Optionally we could think about exposing this via documentation, since it also eases the API inconsistencies related - it would basically say, if you really want to exit, no matter what, call this.
For deprecation purposes we could alias this one in lib/process.js.
For API examples see other modern languages.
It's also doubtful whether the use of exit(3) is correct in that context and _Exit(3) (see here) would have been more appropriate. Discussion would be more academic though, imo.
processIn the wake of #6456 I want to suggest to rename
process.reallyExit()as it's name is poorly chosen. It was introduced in f6a7fe2 and imo doesn't fit the intention of the commit - the repo was young back then.An adequate name would be
os.exit()since the exit call is implemented by the OSes differently. Optionally we could think about exposing this via documentation, since it also eases the API inconsistencies related - it would basically say, if you really want to exit, no matter what, call this.For deprecation purposes we could alias this one in
lib/process.js.For API examples see other modern languages.
It's also doubtful whether the use of
exit(3)is correct in that context and_Exit(3)(see here) would have been more appropriate. Discussion would be more academic though, imo.