codeskyblue / fswatch

Watch file change, and trigger commands. (Cross platform)
Apache License 2.0
345 stars 61 forks source link

killSignal behaviour #12

Closed franciscocpg closed 8 years ago

franciscocpg commented 8 years ago

Why killSignal cannot be configured using .fsw.yml and it is being forced to SIGKILL?

codeskyblue commented 8 years ago

Signal can be configured.

franciscocpg commented 8 years ago

Yes, but Signal it works only when we edit and save something. When we press CTRL+C it uses killSignal and sends SIGKILL . By doing this my program only receives the proper signal notify when I edit/save something, but not when I press CTRL+C using fsw.

codeskyblue commented 8 years ago

yes, you are right, when edit something, program accept signal, only reload, sometime not quit. But when press CTRL+C fswatch exited, so at that moment, it is better to clean the environment which mean kill all running program. That's why send SIGKILL

franciscocpg commented 8 years ago

Right, but why can't this be an option to the user? At I mentioned here https://github.com/codeskyblue/fswatch/issues/12#issuecomment-230768549, my program is not stopping properly and because of that I can't use fsw (which is a wonderful too) for develop. Can I propose a PR?

codeskyblue commented 8 years ago

year, add an option seems a good way, pr is welcome.