cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.79k stars 130 forks source link

BUG: modd does not seem to shutdown deamon processes correctly when getting stopped #124

Open Buh13246 opened 1 year ago

Buh13246 commented 1 year ago

I have a go-based application that needs to save internal data. The application handles signals and stops itself correctly when modd detects a change.

When I stop modd, I would expect that the application also gets a signal and shutdowns correctly. This does not seem to be the case. The application just dies without a good indication why (maybe sigkill).

modd also doesn't log that it want's to send the signal to the process. normal behaivour:

03:54:21: daemon: ./GTAServerHomepage
>> sending signal terminated
exited: signal: terminated
>> restart backoff... 1000ms
>> starting...

On sigint:

>> starting...
^C>> stopping
➜  backend

Is this the expected behaviour or am i just doing something wrong?

Buh13246 commented 1 year ago

This is related to: https://github.com/cortesi/modd/issues/78

I could fix my issue with the provided not merged PR.

Is there any plan of fixing this issue because a sigkill should always only be the last resort.

amery commented 1 year ago

any well maintained fork available?