How can I control process termination timeout ?
Posted on 1998-11-13
I am using NT4.0 and I have the following question regarding to process control.
1. When we stop a process from task manager, if this process fails to respond, after certain time, we get a dialog box saying something like "wait..." or "End task", etc. How can we control this timeout ? I guess if we choose EndTask, NT will call TerminateProcess() to kill the process. But in some case, the process will still hang over there. Any way to handle this problem ?
2. When we stop a service from SCM, again, we will get a dialog box complaining the NT service is not responding in a certain time. How can we control this timeout ?
3. When we "Shutdown the computer", there is a certain timeout again. How can we control that ? Also, from a program, how can I issue a Shutdown the computer command ?
Any help is greatly appreciated.