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

JonnyFrond

macrumors newbie
Original poster
Jan 15, 2011
9
0
Hi there guys, I'm new here, so forgive me if i have not got this in the right room.

Basically, I am learning how to use the command line on the mac, and I have come across a curious thing. Concerning the Kill command.

I used it to quit the preview app, and it quits and then restarts.

I have tried these so far

kill -15 (PID) Application restarted
kill -9 (PID) Application restarted
and kill -3 (PID) Error message - Application quit unexpectedly.

where (PID) is the process code.

Now I can understand the last one, but I am very curious as to why the other two should make preview quit and then restart straight away.

To be fair, it is possible that the icon is not quitting at all but just bouncing in the dock, but either way, what could I be doing wrong as concerns this, all other applications close very nicely with:
kill -15 (PID)

Kind regards

Jonny
 
Hi there guys, I'm new here, so forgive me if i have not got this in the right room.

Basically, I am learning how to use the command line on the mac, and I have come across a curious thing. Concerning the Kill command.

I used it to quit the preview app, and it quits and then restarts.

I have tried these so far

kill -15 (PID) Application restarted
kill -9 (PID) Application restarted
and kill -3 (PID) Error message - Application quit unexpectedly.

where (PID) is the process code.

Now I can understand the last one, but I am very curious as to why the other two should make preview quit and then restart straight away.

To be fair, it is possible that the icon is not quitting at all but just bouncing in the dock, but either way, what could I be doing wrong as concerns this, all other applications close very nicely with:
kill -15 (PID)

Kind regards

Jonny

Well first of all the easiest way to tell if it is really relaunching is to see if it gets a new PID. If it doesn't get a new PID then it isn't really restarting. The other is to see if there is some sort of helper daemon running that automatically relaunches it a la Finder. It could very well be there is some other process that is monitoring the Preview pid and automatically relaunching it when it detects it has been killed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.