Hi, everybody!
I am currently writing some CGI programs which need exclusive access to particular files. (Never must these files be accessed from more that one instance of this program, but -- because of the nature of cgi -- it can theoretically be launched unlimited times...
So I use a lock file which I place in /tmp/ and the program tests its presence and waits until it is vanished, then it creates one by itself...
Well, but:
When I loop infinitely, always testing the presence, I force a dramatic CPU load. So I tried to implement crt (or ncrt) to have delay() available and to free up hereby the CPU for some seconds.
This shall allow the other instance of the program to get more CPU power and finish quicker.
However, when I use *crt, the program does very nasty things, but not what I want, so I cannot use crt/ncrt.
How can I force a scheduling to sleep for a while?
Ing. Rainer Hantsch
\\|// Ing. Rainer HANTSCH - Hardware + Software (o o) Your Partner - Your Supplier - Your Friend! --oOOo-(_)-oOOo-------------------------------------------------- Ing. Rainer HANTSCH | e-Mail:
Khunngasse 21/20 | www : http://www.hantsch.co.at A-1030 Vienna | Tel. : ++43 - 1 - 7988538 0 ---------------------| Fax : ++43 - 1 - 7988538 18 ** AUSTRIA ** | Mobile: ++43 - 663 - 9194382 -----------------------------------------------------------------