Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mfacey

macrumors 65816
Original poster
Feb 1, 2004
1,230
9
Netherlands
Yes, force quit isn't doing the trick for me right now. iTunes is hanging right at this moment and I can't even shut down safely because the OS can't close iTunes. Very annoying. Is there anyway I can get it to shut down itunes (besides force quit) so I can safely reboot?
 
That's happened to me a couple of times. After selecting force quit numerous times and resulting in nothing, I just left it.
I came back after watching a TV show and it had quit! I guess it just got itself in a loop and just needed a bit of time to work it out :D

Failing that, just force restart (hold the power button in for ~5 seconds). It's quite safe.
 
2. Command+Option+ESC

1. Pull the power cord. Tied with flipping the switch on the surge protector.
 
mfacey said:
Yes, force quit isn't doing the trick for me right now. iTunes is hanging right at this moment and I can't even shut down safely because the OS can't close iTunes. Very annoying. Is there anyway I can get it to shut down itunes (besides force quit) so I can safely reboot?
Quit any Classic applications

Force Quit Classic

Force Quit Finder

By then, you might be able to Force Quite iTunes

Sushi
 
Flying Llama said:
Try opening up the Terminal (Applications -> Utilities) and type in "killall iTunes" without the quotes. Good luck!

llama
That's one of my favorite commands :)
 
I'm having a similar problem with my PB when it tries importing (or trying to read) a scratched CD. It just sits there futilely spinning up the disk, and then failing, and then trying again ad infinitum - it does not sound good - and iTunes is beachballing along with anything else running, and neither force quit nor eject does anything. (I can't even get the force quit dialogue box to open).

I have to turn off the comp by holding the power button (thus losing any unsaved data). Is there another other solution to such a CD/DVD freeze (aside from not trying to import scratched CDs ;)) ?
 
What's the difference between:
killall iTunes
killall -9 iTunes and..
killall -9 PID ???
I'm guessing that the last one force quits everything, but what do the first 2 do?
 
PID is actually short for the process identification number. I don't think, unless I misunderstand, that you type in the "PID" -- you have to use ps -aux or some other method to get the PID, and then you use it in place of the word "itunes" to identify the process.

Adding the -9 changes the signal sent from "Terminate" to "Kill" -- according to the way Unix works, with the former signal, the program can ignore or refuse the signal, but with the latter, it can do neither.

P.S. ... once you've got terminal open, if what you want is to shutdown, and are unable to do so, "shutdown -h now" should do it for you, without you having to figure out what app is preventing you from quitting. :)
 
epepper9 said:
What's the difference between:
killall iTunes
killall -9 iTunes and..
killall -9 PID ???
I'm guessing that the last one force quits everything, but what do the first 2 do?

killall is a command that piggybacks on the more common command, kill.

kill takes a pid (process id) number as an argument, and usually sends that process a TERM signal. applications receive TERM signals in a special handler and can handle them however they want. usually they perform some quick cleanups (closing files, e.g.) and then return to the shell. but an application could, in theory, ignore this message and keep right on running.

kill can send other signal to applications, however. this might be advantageous because some signals cant be blocked, such as the KILL signal, which is also numbered 9. so when you kill -9, thats the same as saying kill -KILL, which basically ensures that a program closes.

killall takes a process name as an argument, instead of a pid, because for a human its usually easier to guess the name than the pid. (to find the pid, you'd need to lookup the process, e.g. "ps aux")

as far as i know, killall -pid is not a valid command. i dont know of any way to kill *all* processes without writing a command that lists every single process, such as

killall Finder iTunes AppleWorks etc...

killing certain processes can wreak havoc though, so dont just go around killing random stuff.
 
I have sometime noticed that if Force Quit doesn't work I can get the process killed by opening up the activity monitor and doing a force quit from there. Seems to work for me. (or kill -9 from the terminal if I have it open at that time)

Kimo
 
Good god, pull the power cord?

What kind of solution is that?

Open the Activity Monitor (in Utilities), select the offending process, click the little red stop sign in the upper left hand corner, and select "force quit." This works even when the traditional force quit doesn't.

I suspect that it sends the "killall" terminal command, but since I always run with the activity monitor on it's faster this way.
 
I may have an alternative...

Maybe you can quit iTunes by opening the Activity Monitor and then selecting the iTunes process and force-quit.
 
Angrist said:
Good god, pull the power cord?
I did that with a PC the other day.

Was going to nuke the HD with KillDisk anyway. So rather than wait for 2K to Shut Down I just unplugged it.

What I hate to say, is that I felt a certain satisfaction to doing it. :D

On a side note, the worst emergency shutdown that I had to do was when I accidentally dumped about a half litter of water on the keyboard of my PB15.

- Power Adapter out

- Remove battery

Fan sound. WFT? A fan kept going and going.

- Emergency disassembly of my PB15 to remove the backup capacitor that powers a fan to ensure cooling takes place even if the battery is dead.

Needless to say this is not how you want to learn how to disassemble a PowerBook.

Dried everything out for a day or so. Put it back together. All worked fine.

I was very lucky. :D

Sushi
 
Thanks for all the responses guys!

Before waiting for all of the responses to my question I got sick of waiting for itunes and just did a hard shut down (using the powerbutton). Worked fine. No other problems to be found. I actually have no idea what caused itunes to hang. Oddly enough the icons on the top right of my screen (like spotlight, etc) didn't work either when itunes was hanging. When I moused over them all I got was a spinning beach ball. Strange considering I relaunched Finder and I don't have anything up there having to do with itunes.

I'll remember those terminal codes for another occasion though!
 
Worth noting that there is one situation in which even kill -9 doesn't do the trick: If the process is hanging waiting for disk access (either from a network volume or stalled hardware), NOTHING that I'm aware of will cause it to terminate. I've heard a more technical explanation of this, but as I understand it it's a weakness of the kernel that it basically blocks on a wait for disk access.

This causes issues with flaky FW hard drives and/or networked volumes that aren't responding but the OS won't give up on, and as far as I know it's an architectural issue that there's no workaround for.

I'd love to hear it if there is, though--I've had problems with this at work that nothing short of a hard power down will fix. On the positive side, 10.4 seems considerably more resilliant when dealing with mounted network volumes.
 
Angrist said:
Good god, pull the power cord?

What kind of solution is that?

A really, really bad one. Disk directory damage all most for certain.

Even a power-button forced shutdown should be followed by an fsck.
 
mfacey said:
Thanks for all the responses guys!

Before waiting for all of the responses to my question I got sick of waiting for itunes and just did a hard shut down (using the powerbutton). Worked fine. No other problems to be found. I actually have no idea what caused itunes to hang. Oddly enough the icons on the top right of my screen (like spotlight, etc) didn't work either when itunes was hanging. When I moused over them all I got was a spinning beach ball. Strange considering I relaunched Finder and I don't have anything up there having to do with itunes.

I'll remember those terminal codes for another occasion though!

yeah exact same thing happens to me too, i found that the menu bar must be a part of the process named "SystemUIserver" in activity monitor, when i force quit it, spotlight and menu bar stoped hanging and i was able to force quit itunes, but htis was only oon oen specific occation, any ogther time this ghas happened this did not work for me but i'm glad to know that i'm not the only one experiencing these problems

EDIT: also, the killall -9 iTunes command doesn't do anything either
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.