954,292 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Best programing language for watching a process (and sleep)

Hello,

I am new to the community (well my first thread anyway). I was just wondering which programming language would be the most effective to run a light weight process watcher, and when it detects a particular process to start a another wait loop, which, when the process ends it will force the computer to sleep. (Another requirement is to do this again upon waking up)

So the general layout of the process:

wait(){[INDENT]if(ProcessName is running){[INDENT]wait(){[INDENT]if(Processname is no longer running){
Tell Computer to sleep
break to the outside wait loop
}[/INDENT]}[/INDENT]}[/INDENT]}


Any help would be greatly appreciated.

Drpills
Newbie Poster
2 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Assuming that this isn't just an academic question and that you want to do it yourself, then the best answer is to use something that you are comfortable with. If you want it to be lightweight and you are already into C or C++ then they can do it. It is unlikely that you will learn a new language just to code this module. If I had to do it, I would probably use something that isn't so lightweight because that is what I am familiar with and because I don't think that lightweight is all that important anymore given todays processors and larger memory under 64 bit systems.

chrishea
Nearly a Posting Virtuoso
1,427 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: