Issuing a Break Command

Hello all-
I'm trying to get some code running in MATLAB on my MacBook Pro, and I made the mistake of writing an infinite loop. Normally, I'd just hit Ctrl BreakBreak in order to terminate the running program. There's no Break key on the Apple keyboard, and so instead, I had to use Activity Monitor to kill the runaway program. How do I issue the equivalent of Ctrl BreakBreak on a MacBook Pro keyboard or in Mac OSX at all?

MacBook Pro, Mac OS X (10.5.5)

Posted on Oct 17, 2008 1:29 PM

Reply
5 replies

Oct 17, 2008 4:15 PM in response to Robin Armistead

Robin Armistead wrote:
Hello all-
I'm trying to get some code running in MATLAB on my MacBook Pro, and I made the mistake of writing an infinite loop. Normally, I'd just hit Ctrl BreakBreak in order to terminate the running program. There's no Break key on the Apple keyboard, and so instead, I had to use Activity Monitor to kill the runaway program. How do I issue the equivalent of Ctrl BreakBreak on a MacBook Pro keyboard or in Mac OSX at all?


Welcome to Apple Discussions
In a terminal usually Ctrl-d or occasionally Ctrl-d works, but sometimes it depends on the application or process.
Usually Ctrl-c
Also depending on your terminal settings it may be Cmd-C or Cmd-D.
You could of course run the ps command and then kill the PID which is the usual way of terminating an errant process, but that takes time.
If it happens a lot, open a second tab in terminal, do the ps in advance to know Matlab's PID and you could even type in kill PID ahead of time.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Issuing a Break Command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.