in reply to memory consumption
As for the memory leak, a classical solution for such daemons is to have them exec() themselves every once in a while. This doesn't work (easily) if the daemon needs to keep state, but your program doesn't. So for instance, you could keep a counter which you increment each loop, and once the counter goes over 500 (or some other number), instead of the goto, you do an exec $0;
Still, I'd go for the crontab solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: memory consumption
by afoken (Chancellor) on Jul 07, 2009 at 16:31 UTC | |
by JavaFan (Canon) on Jul 07, 2009 at 19:35 UTC |