As far as I know, I think that is all it does. I haven't looked too closely at it. So you are doing that already and still having the files issue?
Have you changed your hard and soft file limits?
/etc/security/limits.conf:
root soft nofile 34096
root hard nofile 34096
Once I point lots of Ghps to this it does not live much longer than 5 minutes, perhaps simply not enough time between solved blocks.