Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Try the options..' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Try the options..
Authored by: robg on Mar 14, '01 05:31:25PM
I think what you're looking for is ps -x, where the "-x" option adds "information about processes without controlling terminals" to the standard output. Your GUI jobs will now be listed.

The challenge at that point is figuring out which job to terminate. Cocoa apps are easy - they're listed by name. Carbon apps are tough, as they're all "LaunchCFMApp" (hope this changes in final!). Classic is toughest of all, since the OS sees it as an application. You can't just quit one Classic app, you have to quit Classic in general.

[ Reply to This | # ]
Trial and error method to identify a carbon app
Authored by: robh on Mar 14, '01 06:40:24PM

Using trial and error, and access to the GUI (so no use to the original poster) you can pause a running app with "kill -STOP process-number" and then try to use it. If the app has been paused then you'll see the spinning wheel pointer and you won't be able to interact with the app. If you picked the right process number you can "kill -KILL process-number" to zap it. If you picked the wrong process number you can resume the app with "kill -CONT process-number".

FYI, "kill -STOP" is equivalent to hitting CTRL-Z to pause a running process in a terminal shell, and "kill -CONT" is equivalent to resuming it with the "fg" command.

"kill -STOP" is handy for pausing (as root) someone else's cpu hungry process while you run something more important. You can "kill -CONT" the process when you're finished.

[ Reply to This | # ]