Solved

Urgent Thread active problem.

Posted on 2002-04-18
9
171 Views
Last Modified: 2013-11-20
I have one MFC application. Some time on one Win 2000 Sp2 machine showing one problem.
Problem is after exiting my app some Treads remaining active.The process is not active on taskmanager but pslist showing the process as active. Any idea ??????
0
Comment
Question by:job_s
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6952886
MSDN Says

SYMPTOMS
A process continues to exist after a call to the TerminateProcess function on that process has successfully returned.

CAUSE
When there is a request to terminate a process through the TerminateProcess function, Windows stops all the user-mode activity of the target process. However, the target process cannot actually exit until all kernel-mode activity specific to that process is complete. This means that the target process continues to exist until all of its threads have left kernel-mode and all pending IO has been canceled.

This situation occurs as the result of a device driver not releasing a thread or not canceling IO. The process continues to exist until the IO completes and all threads in the process are released from kernel mode.

GOOD LUCK
0
 
LVL 3

Author Comment

by:job_s
ID: 6952978
Do u have any idea that how much time it may take to complete the opertaion like pending IO ????
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6953073
If u r not closing a kernel object in user mode not properly, this may cause problems....


Roshmon
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6959149
Sometimes you can call CancelIO( handle ).  It is not availble on Win 95.

-- Dan
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:job_s
ID: 6962773
hi frieds,

    Thanks for Ur responses.I have find out the problem myself .

job_s
0
 
LVL 3

Author Comment

by:job_s
ID: 6962780
I have find out the solution my self.
The problem was because of teminal services running on that system.When another terminal user runs that APP.It will be shown as a proces on the pslist.

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6963585
Good info.  I suggest that you post to Community Support and ask to have your points refunded since you found the answer yourself.  

I recommend that this NOT be deleted, but rather saved as a PAQ.

-- Dan
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11428682
PAQed, with points refunded (200)

Netminder
EE Admin
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now