npm / lockfile

A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.
ISC License
260 stars 33 forks source link

Catch exit by Ctrl+C #21

Closed Redsandro closed 6 years ago

Redsandro commented 8 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')

It should also listen to process.on('SIGINT') (linux at least).

isaacs commented 8 years ago

Indeed! This module should probably use signal-exit to remove locks.

Redsandro commented 8 years ago

Good catch, I hadn't seen that module before.