HPlogo Using the X Window System > Chapter 8 Using the X Clients

Stopping Programs

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Glossary

 » Index

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 CTRL c.

  • Press CTRL d.

  • Press q.

  • 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:

  1. Save any data that needs saving.

  2. Find the PID (process ID) by executing:

       ps -fu login_name
    

  3. To kill the program, execute:

       kill -2 pid
    

    where pid is the PID number. This is equivalent to CTRL c.

  4. If this doesn't work, execute:

       kill -3 pid
    

  5. If this still doesn't work, execute:

       kill -9 pid 
    

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.

© 1995 Hewlett-Packard Development Company, L.P.