If a program has data you want to save, you must save the data before
you stop it. 
If a terminal window is running a non-client containing data,  you must stop the non-client in the approved manner before you stop the window.  Generally, a non-client has a "stop" provision, or stops
when it has finished executing. 
After you have saved any data and exited any non-clients (in the case of terminal windows), stop the client by choosing the "Close" selection from the client's window menu. 
Note that if you started a non-client as an option of creating a window, when you stop the non-client, the window will stop. 
If you are unable to stop a program in the normal manner, you should "kill" the program before you log out. 
To kill a program, first try these keystrokes: 
Press ESC, then :, then q.
If these don't work, use the HP-UX kill command to stop the program's execution environment or "process."  To use the kill command: 
Save any data that needs saving.
Find the PID (process ID) by executing:
To kill the program, execute:
where pid is the PID number.  This is equivalent to CTRL  c.
If this doesn't work, execute:
If this still doesn't work, execute:
Certain programs are cached during a session; that is, once they are
started, closing them unmaps the window but does not stop the process.  If you need to halt one of these processes during a session, use the kill command.