Control panels that manages Windows services operates a tad differently than a LINUX system. Though one thing I'm concerned while working on my CP so that on the road ahead, it will scale to a Windows platform without much difficulties. The difficult part though I'm having trouble to realize is how Windows handles proceses.

My plan is to code an interactive script that runs in the background. On LINUX, you could compile PCNTL which allows you to fork children off of your script running as the parent. That way you can track whether a children already exists and still running and not to start a new child until it finishes it task.

Very useful for stats as it takes sometimes hours for stats to be analyzed and created for clients with a large quantity of traffic.

So forking the bit that analyzes web traffic could start and the script can check if this process is still running and not to start a new one.

On Windows system, PCNTL is not available due to the way it handles processes. How can you execute a command and verify that it's running so that you don't accidently start another process which could have processes running all over the place?