in reply to Limiting CPU usage on this program...

Well, your program keeps on going and going due to that while (1) loop. Of course it will "hammer" the CPU, if you are unlucky, it will hammer your disks as well.

I'm not sure what you are trying to do (yeah, moving the files round robin to another directory - just like the question in some other thread). Why does it run as a daemon? What about cron? If you have an infinite loop, shouldn't it use a sleep, or wait for something to happen before continuing?

Abigail

  • Comment on Re: Limiting CPU usage on this program...