benjaminRomano / gulp-manager

Manage gulpfiles from inside Atom
https://atom.io/packages/gulp-manager
MIT License
11 stars 1 forks source link

Closing Atom leaves Gulp tasks running in the background #16

Open aewing opened 8 years ago

aewing commented 8 years ago

When running a continuous gulp instance (sync, forever, etc...), if I close Atom, the gulp task remains in the background, running. This prevents me from binding to network addresses and causes some havoc when multiple instances are spawned.

benjaminRomano commented 8 years ago

Thanks for letting me know about this bug.

I'm not sure if Atom's API exposes a method to detect when the application closes and allow a package to execute code before it shuts down. I'll look into seeing if that's possible. If not, then I believe you would have to manually stop all gulp-tasks currently running, which would be unfortunate.

I'm pretty swamped the next couple of weeks so I won't have time to look into this issue. If you are feeling ambitious, you can look into the issue and submit a PR if you find a solution.

If you are interested, you should look into seeing if the deactivate function for packages is triggered when the application is shut down.