Is there anyway to capture a SIGINT or SIGTERM from the shell in R so that I can try to execute some graceful exit code?
So far, I haven't found anything in my search.
Is there anyway to capture a SIGINT or SIGTERM from the shell in R so that I can try to execute some graceful exit code?
So far, I haven't found anything in my search.
It has been a while since you asked and in the meantime someone solved this in a package:
https://github.com/atheriel/sigterm
From the README: