1

On two instances, I've been unable to empty my trash because it contained a pdf that the system claimed was in use. On both occasions, I typed the lsof command to find out which app was using it. In both instances, Preview was indicated -- yet it wasn't shown in the Dock! Activity Monitor does show Preview running.

How can this be?

1

It's possible that the plist of the application has been changed (eg, /Applications/Preview.app/Contents/Info.plist). There is a setting LSUIElement, which if is true, causes the app to be hidden from the dock, the ⌘-Tab application switcher, etc. See this similar question for more details.

  • Good tip, but worth noting that if this was the case for Preview, then opening preview normally would not be possible. – NReilingh Jul 31 '14 at 2:44
  • I could swear that this problem started occurring when I configured SpamSieve (an app that works as a spam filter) in a special way so as not to appear in the Dock while running. After I reset the special setting so that SpamSieve would appear in the Dock, the problem hasn't recurred. Does this make any sense? – odysseus Aug 4 '14 at 21:30
1

What you are experiencing is a side effect of Automatic Termination a feature that was introduced in 10.7 Lion. This feature lets the operating system shut down applications whenever it either needs the resources they are using or when it decides you aren't using them anymore. However while it removes the application from your screen, if it has enough resources it will keep the process around in a sleeping state just in case you plan to reuse it, allowing it to quickly relaunch it.

You can easily test this for yourself by opening a single JPEG in Preview. If you close the JPEG and bring another application to the foreground you should see Preview disappear from your dock almost instantly. However if you check Activity Monitor, for a while, you should still see Preview listed but sitting with 0.0 CPU, and if you run ps -j | grep Preview you should see the process listed but with state set to "S" for sleeping.

If Preview was preventing you from clearing PDF files from your Mac, my guess is that you had the files open in Preview but the application had been in the background for a while, so the OS decided you weren't using it anymore and closed it. However it still had the Preview process running in a sleeping state ready to bring quickly back to life should you want it, coincidentally keeping access to the PDF files open as well, preventing them being deleted. Given time, the OS would release Preview from memory and release its hold on the files as well.

0

What is shown in the dock has little correlation to everything that's running. The Dock is just a GUI showing, generally, if a GUI component of an app is running. There are hundreds of various background processes running that will not be shown in the Dock; I'd imagine Preview might have some background process to write out changes or something that could stay alive even though the GUI closed. Another thing that might be going on is that the system keeps it in memory for a while even though you closed it, for purposes like caching / faster app startup.

The bottom line is that you can't really expect the Dock to mirror what exactly is going on in the system; it's just a simple GUI for regular users.

  • Why the downvote...? – houbysoft Jul 14 '14 at 21:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .