Equivalent of alram() call in VC++?

Hi,

Is there any function call similar to unix alram call in VC++ on Win 95 system. I need to use it to terminate a program which hangs. If not is there a work around for this.
bagalpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

q2guoCommented:
I think raise() is the function you are looking for

<signal.h>
int raise( int sig )

0
bagalpAuthor Commented:
I want a function call which can be used to time out the program which calls it. Using raise() I will need another process to keep track of this process. raise() is equivalent to a signal() call in UNIX. Here I have a program which potentially hangs. So I need something using which I can time out this program. That is equivalent of alram() call in unix.

Sorry if I was not clear during my first question.
0
galkinCommented:
Create another thread with higher priority which would spy main thread and if it sees main thread has hung it will terminate it.

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

bagalpAuthor Commented:
Thanks for the work around.

Does this mean that VC++ has no concept of timing out an application.



0
jhanceCommented:
If you need to time out after a specified period of time, use a timer (SetTimer() function).  When the time fires, you application will get a message and you can do whatever it is that needs to be done.  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bagalpAuthor Commented:
OK that's something that will give me some control over the application.

Thanks for your time.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.