UCSF-CBI / rstudio-server-controller

RStudio Server Controller (RSC) - A Tool for Launching a Personal Instance of the RStudio Server
https://github.com/UCSF-CBI/rstudio-server-controller
ISC License
4 stars 2 forks source link

rsc stop: assert that things are shut down + attempt again, if not #65

Closed HenrikBengtsson closed 2 years ago

HenrikBengtsson commented 2 years ago

We're currently signal SIGTERM to all processes we want to shut down:

https://github.com/UCSF-CBI/rstudio-server-controller/blob/e1416dcb6b2ebf8a837eb50141dd20cd875463b3/bin/rsc#L1369-L1396

but we don't really make sure the processes are truly terminated afterward. It could be that they keep running, e.g. stuck or overwhelmed processes.

Actions

HenrikBengtsson commented 2 years ago

Now tries multiple times with TERM, sleep one second before checking, and if still running, sleep two seconds and repeat. After four failed TERMs, do one last with KILL.