We help IT Professionals succeed at work.

I'm getting multiple processes when my application is closed, started, closed, started... how do I kill the process when my application closes?

158 Views
Last Modified: 2013-11-26
My application is started and stopped on peoples machines multiple times during the day.  Sometimes in the task manager where will be 4+ processes running for my application even though only one instance of the application is opened on the machine.

How can I make sure the application process is killed and removed from the task manager eachtime my application is closed?
Comment
Watch Question

Christopher KileSenior Software Analyst
CERTIFIED EXPERT

Commented:
Phew...that depends on what your application does while it's active.  What, in general, does it do?

Author

Commented:
my application pretty much runs the company.  Every department accesses it for something.... either scanning invoices automatically, creating job estimates and populating excel sheets to convert to PDF, print and send to clients.  Updating job details and regenerating an excel sheet.  Tracking inventory incoming and outgoing.  login employee hours and calculating costs verses income, Checking data files for data format accuracy, sending and receiving from ftp and ziping the files.  Updating a sql 2005 database....etc.
Even though it does a lot, it should not still be running as a process when the employee closes the application.  It happens on occasion that multiple processes will stay open even though the program is closed... eventually freezing up thier computers.
Christopher KileSenior Software Analyst
CERTIFIED EXPERT

Commented:
Are you starting up a number of independent threads at the beginning of the process?  Have you performed any analysis yourself to see when and how separate processes under the name of the application are created?  If so, what are the circumstances when this occurs?
Christopher KileSenior Software Analyst
CERTIFIED EXPERT

Commented:
Are you starting up a number of independent threads at the beginning of the process?  Have you performed any analysis yourself to see when and how separate processes under the name of the application are created?  If so, what are the circumstances when this occurs?

Author

Commented:
I don't know how to find out if my application is starting up independent threads.... at least I have not declared any to do so.  And, I don't know how to perform an analysis to see how these seperate processes are occuring.
Senior Software Analyst
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I prevented the application from starting if a current process was already active by checking my processes first and making sure all processes are closed when the program is exited.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.