This is a port of kexec from nan to node-addon-api, which cleans up the code and provides support for node versions up to the latest (currently node 13). Migrating from nan to node-addon-api removes support for node 7 and below, so this would need to be released as a breaking change.
This PR also cleans up error handling by checking of the return values of all system calls, and throwing JS exceptions with information about any system call failures.
Not sure if this is the direction you want to take the project, but I wanted to offer the contribution in case you feel that migrating to node-addon-api is the right call.
This is a port of kexec from nan to node-addon-api, which cleans up the code and provides support for node versions up to the latest (currently node 13). Migrating from nan to node-addon-api removes support for node 7 and below, so this would need to be released as a breaking change.
This PR also cleans up error handling by checking of the return values of all system calls, and throwing JS exceptions with information about any system call failures.
Not sure if this is the direction you want to take the project, but I wanted to offer the contribution in case you feel that migrating to node-addon-api is the right call.