Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Note: This is just out of curiosity, hope this doesn't sound stupid or anything.) As I'm sure most of you know, every time Google Chrome is "shut down incorrectly" (eg. cutting the computer's power supply), it will display a yellow bar at the top the very next time it is opened, saying that it wasn't shut down correctly and offering to restore the pages that were last opened. How does it do that? More specifically, how does it detect that it wasn't shut down correctly? Thanks.

share|improve this question
up vote 1 down vote accepted

It depends on the operating system but one common way for any app to do this is to write to a "logbook" of some sorts every time the app is opened or closed.

In windows this would be the system registry. When chrome opens/closes it writes to the registry that it has successfully opened/closed without any problems. Every time chrome opens it also checks whether there's any discrepancies in the log. If there is a "successfully opened" entry but no matching "successfully closed" entry, then that's when it knows.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.