Closed Redsandro closed 6 years ago
If the script is exited by Ctrl+C, the lock is not removed.
If the script exits normally, it is caught by process.on('exit')
process.on('exit')
It should also listen to process.on('SIGINT') (linux at least).
process.on('SIGINT')
Indeed! This module should probably use signal-exit to remove locks.
Good catch, I hadn't seen that module before.
If the script is exited by Ctrl+C, the lock is not removed.
If the script exits normally, it is caught by
process.on('exit')
It should also listen to
process.on('SIGINT')
(linux at least).