taskd.pl: implement --max-lifetime with 1 week default
commitbc175da589c4023f3d107c6a3f2f66573264c121
authorKyle J. McKay <mackyle@gmail.com>
Fri, 2 Dec 2016 05:22:30 +0000 (1 21:22 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 2 Dec 2016 05:22:30 +0000 (1 21:22 -0800)
treee03ac9d0baa113d99d7e08850d9a4ac070440726
parentc2c126bd62c9b3cbc6944b44fa611ab319670035
taskd.pl: implement --max-lifetime with 1 week default

When taskd's maximum lifetime (in realtime) is exceeded, initiate
a graceful restart.  The default is one week.

A graceful restart of taskd will trigger a graceful restart of
jobd if jobd is running at the time the graceful restart occurs.

While neither taskd nor jobd are known to be prone to memory bloat
(where the memory used continues to increase the longer they run),
a maximum lifetime setting provides a nice safety valve to prevent
such a problem from occurring in the first place.

A maximum lifetime setting of 0 can be used to disable this feature.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
taskd/taskd.pl