beta.blog

macOS: Pause/Suspend a Process

by on Jun.15, 2022, under News

It’s possible to freeze a running process on macOS with preinstalled tools. First we need to find the process ID (= pid) of the running process we’d like to suspend. We could use the Activity Monitor or ps for that.

Suspending

Type the following command in a Terminal. Make sure to replace <pid> with an actual process ID extracted previously:

kill -STOP <pid>

example: kill -STOP 7979

This command will freeze a running application (but it won’t kill it).

Resuming

If we’d like to resume the process at a later point execute the following command in a Terminal. Also, make sure to replace <pid> with the actual process ID:

kill -CONT <pid>

example: kill -CONT 7979

The process should now work properly again just like before.

:

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!