473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to find whether the proces is running or not?

Hi All,
I am working on Windows platform.
Is there any way to find out whether the given process running?

( History: I am using WaitForSingleObject. People advised me the
WaitForSingleObject could hang if the process for which we are waiting
terminated earlier to calling WaitForSingleObject. So I am trying to
check whether the given process is running)
Thanks
Sabiyur

Apr 16 '07 #1
2 3314
Sabiyur skrev:
Hi All,
I am working on Windows platform.
Is there any way to find out whether the given process running?

( History: I am using WaitForSingleObject. People advised me the
WaitForSingleObject could hang if the process for which we are waiting
terminated earlier to calling WaitForSingleObject. So I am trying to
check whether the given process is running)

Try

http://support.microsoft.com/kb/175030

--
OU
Apr 16 '07 #2
On Apr 16, 8:17 pm, "Sabiyur" <SabiyurRah...@gmail.comwrote:
I am working on Windows platform.
Is there any way to find out whether the given process running?
( History: I am using WaitForSingleObject. People advised me the
WaitForSingleObject could hang if the process for which we are waiting
terminated earlier to calling WaitForSingleObject. So I am trying to
check whether the given process is running)
It depends on the system; Posix's waitpid(), for example, has a
WNOHANG option which effectively prevents blocking. On some
systems, you can set a timeout on the process wait, and setting
it to 0 effectively means to poll; this is the case for Window's
WaitForSingleObject, for example.

Otherwise, the classical solution is to spawn a separate thread,
and wait there.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Apr 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anand Pillai | last post by:
I would like to add a feature to one of my network programs. The requirement is to find out if a server is alive by sending it requests. I know of the standard ICMP ping, and searched for python...
0
by: sjaak538 | last post by:
Hello I have my own server running with MySQL, PHP..... and asterisk(VOIP) Sometime I have that so much visitors(search engines) that MySQL is taking all the processing time. Ive running...
5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
90
by: Bret Pehrson | last post by:
This message isn't spam or an advertisement or trolling. I'm considering farming some of my application development to offshore shops (I'm in the US). I have absolutely *no* experience w/ this,...
1
by: Jesper | last post by:
Hi, I've made a program runs in the background, ie not shown on the task bar but only with a tray icon next to the watch. If I use Alt+Tab its possible to select the program from the list of...
3
by: Primera | last post by:
I am trying to determine if a particular process is running. I think I am probably missing something obvious, but here is what I have so far... ManagementObjectSearcher msProcessCcmExec = new...
1
by: theTone | last post by:
Hi all, We have noticed that using the Word OLE is much slower on dual processor machines. Limiting the processor affinity to one processor helps. So, I want to set the affinity in my C# code....
0
by: anups | last post by:
Im new to DB2.Im using DB2 client.I need to find out whether a procedure which I have started is still running in DB2.How do i find out that? Also if i fire a sql query and that locks some table...
1
by: Techidada | last post by:
Hi I am running a background command and want to mointor output of that commands which generate some flag files. When it finish it should be stopped. I tried this open(MON, "$CMD >...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.