473,396 Members | 1,836 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,396 software developers and data experts.

Cannot terminate the application

Hello,

I have an application that has several threads and non-blocking
client sockets.

When I try to terminate the program, although the application window
disappear, but the program instance is still here. When I run it in debug
mode, "Stop debugging" button is still enabled. When I compile it and run
it, the program is still listed in "Process" in the Task Manager.

When the program is terminate, all the sockets are disconnected and
the threads are terminated by calling Abort(). I don't know why the program
still can't be terminated completely.

Aaron


Nov 16 '05 #1
2 3195
Try calling

Environment.Exit(0);
"Aaron" <gh@gh.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
Hello,

I have an application that has several threads and non-blocking
client sockets.

When I try to terminate the program, although the application
window
disappear, but the program instance is still here. When I run it in debug
mode, "Stop debugging" button is still enabled. When I compile it and run
it, the program is still listed in "Process" in the Task Manager.

When the program is terminate, all the sockets are disconnected and
the threads are terminated by calling Abort(). I don't know why the
program
still can't be terminated completely.

Aaron

Nov 16 '05 #2
By calling Abort () doesn't mean that it terminated directly.

You can check it using: Thread.IsAlive or you can call Thread.Join() in
order to make the method after Thread.Join() is execute only and if only
the thread are terminated.

Sincerely Yours,
Pujo

On Tue, 18 Jan 2005 12:35:13 -0600, wrote:
Try calling

Environment.Exit(0);
"Aaron" <gh@gh.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
Hello,

I have an application that has several threads and non-blocking
client sockets.

When I try to terminate the program, although the application
window
disappear, but the program instance is still here. When I run it in
debug
mode, "Stop debugging" button is still enabled. When I compile it and
run
it, the program is still listed in "Process" in the Task Manager.

When the program is terminate, all the sockets are disconnected
and
the threads are terminated by calling Abort(). I don't know why the
program
still can't be terminated completely.

Aaron



--
Just Relax, and Do It
Nov 16 '05 #3

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

Similar topics

0
by: Aaron | last post by:
Hello, I have an application that has several threads and non-blocking client sockets. When I try to terminate the program, although the application window disappear, but the program instance...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
4
by: Dr. J | last post by:
How to terminate a blocked thread? In my form's "load" I launch a TCP listening thread that stays in an infinite loop waiting for incoming TCP packets. In this form's "closing" I try to...
2
by: PeteZ | last post by:
Hi, This may seem like a silly question but I'll ask anyway 8^) I have a C# Windows "Console Application" that when a fatal error occurs, I'll log the error and I then want to stop the...
2
by: Strahimir Antoljak | last post by:
Is it possible to prevent terminate the application (and how). I am aware of preventing the closing application, but here I mean on more violent cases when user tries to kill (terminate) the...
0
by: marcmc | last post by:
This is kinda hard to explain so here goes. I have a project as follows... I don't wont a web service or a console service application. 1st interface (SQL Server) Nightly Load to data warehouse...
7
by: fyi85 | last post by:
I have 8.1.5 on Windows 2003, when I do from CLP with auto commit off: db2 update table set column=something and then db2 terminate and then db2 connect to db db2 select updated column from...
1
by: Cylix | last post by:
How to terminnate the application which contain another thread runing a looping of tcplisten? When I just execute the application.exit, the thread doesn't stop. How can I terminate the appication...
16
by: eflatunn | last post by:
Hi all, my problem is that the application doesn't terminate when I close the form using the close box on the caption bar. Actually it seems as if the program is closed but task manager's process...
3
by: =?Utf-8?B?UHJhaGFsYWQgRGVzaHBhbmRl?= | last post by:
Hi All, I am facing a show stopper problem with my development environment. I have VS2005 installed on my system. I wrote a simple C# application that does nothing more than print a Hello World...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.