Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm fairly new to OS X. I am testing a PHP application that runs continuously in a loop.

When I run this application from the terminal, the machine name disappears and the application proceeds to echo out all of the statements as it is supposed to do.

However, while in this state (no 'machine name', no obvious way to enter commands) I cannot stop the application from running.

How can I stop the application from running in this state?

share|improve this question

migrated from May 1 '12 at 21:02

This question came from our site for system and network administrators.

Send the command to a screen using the screen command? – SpacemanSpiff May 1 '12 at 20:37
up vote 12 down vote accepted

Stopping the program altogether can be achieved by pressing Ctrl-C.

share|improve this answer
Thanks. I have Googled that more then once. – John R May 1 '12 at 21:00
Also note that Command-Period will send a Control-C. – Chris Page May 3 '12 at 6:26

Ctrl-C is the appropriate keys to terminate an application running in the terminal foreground. It sends a SIGTERM to the task running in the foreground. When an application receives a SIGTERM it should clean up after itself and then cleanly quit.

Ctrl-Z will send a SIGTSTP. This signal is particularly useful because it doesn't end the execution of the program; it essentially pauses it. You can use this signal along with the fg and bg commands to move running programs to the foreground or background, executing multiple programs at once, or just to relieve strain when the computer is doing too many things at once and you don't want to kill any running applications.

Ctrl-D does not actually send a signal, but it is used to indicate end of transmission or file. Programs that read standard input may interpret this as a close condition. (For example, it will cause shells on UNIX-like systems to exit.)

share|improve this answer

And if Ctrl-C doesn't do it for you, Ctrl-D might do the trick.

So will using the very friendly "Activity Monitor" which is located at /Applications/Utilites/Activity

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .