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.