Stopping Win32 programs

If a Win32 program is started from an Interix session, you can stop it using the Interix kill(1) utility. At the Interix shell prompt, type:

kill PID

where the PID is the process identifier (PID) of the application. To find the PID, type:

ps

If you encounter problems terminating the program, type:

kill -9 PID

The -9 option (SIGKILL) specifies a non-catchable, non-ignorable kill.

If you start a Win32 program from a console window, you can interrupt it with CTRL+C (SIGINTR). If you open a Win32 program in a pseudo-teletype (tty) session, such as telnet, CTRL+C will not work, however; you must use CTRL+\ (SIGQUIT) instead.

You can also stop a Win32 program by exiting it with the appropriate command. For example, to exit a file transfer protocol (FTP) program, you would type:

quit

Programs that run in their own window, such as Notepad, can be closed simply by closing the appropriate window.

If a program is not functioning properly, you can end the program from within Task Manager. To do so, press CTRL+ALT+DEL, click Task Manager, select the task that is not running properly, and then click End Task. A shortcut to Task Manager is CTRL+SHIFT+ESC.

It is important, however, not to end an Interix process by using Task Manager or the Win32 tkill.exe program. When you terminate an Interix process from within the Win32 environment, certain important functions that should occur as part of the termination process are not performed. This can result in unpredictable behavior.