https://www.dssw.co.uk/blog/2012-04-16-shutting-down-your-mac-safely/

提交的 URL:
https://www.dssw.co.uk/blog/2012-04-16-shutting-down-your-mac-safely/
报告完成时间:

链接 · 找到 2 个

从页面中识别出的传出链接

链接文本
https://store.dssw.co.ukStore
https://web.archive.org/web/20230314023657/https://developer.apple.com/library/archive/qa/qa1134/_index.htmlQ&A1134

JavaScript 变量 · 找到 5 个

在页面窗口对象上加载的全局 JavaScript 变量是在函数外部声明的变量,可以从当前范围内的代码中的任何位置访问

名称类型
onbeforetoggleobject
documentPictureInPictureobject
onscrollendobject
uidEventnumber
bootstrapobject

控制台日志消息 · 找到 5 条

记录到 Web 控制台的消息

类型类别记录
warningother
文本
Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
warningother
文本
Error with Feature-Policy header: Unrecognized feature: 'speaker'.
warningother
文本
Error with Feature-Policy header: Unrecognized feature: 'usb'.
warningother
文本
Error with Feature-Policy header: Unrecognized feature: 'vr'.
warningother
文本
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

HTML

页面的原始 HTML 正文

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Shutting Down Your Mac Safely</title>
<link rel="stylesheet" href="/css/dssw.min.6a466365ec3884146203bc8f49f6b2660b4fdfb3191abbc368d54135363ffad9.css"><script type="text/javascript" src="/js/bootstrap.bundle.min.js" async=""></script><link rel="canonical" href="https://www.dssw.co.uk/blog/2012-04-16-shutting-down-your-mac-safely/"><meta name="description" content="A few people have recently asked how Power Manager shuts down their Mac. Let’s look at the two main shut down methods available and then how Power Manager strikes a balance between these two approaches."><meta name="robots" content="index, follow"><meta property="og:url" content="https://www.dssw.co.uk/blog/2012-04-16-shutting-down-your-mac-safely/"><meta property="og:site_name" content="DssW"><meta property="og:title" content="Shutting Down Your Mac Safely"><meta property="og:description" content="A few people have recently asked how Power Manager shuts down their Mac. Let's look at the two main shut down methods available and then how Power Manager strikes a balance between these two approaches."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="blog"><meta property="article:published_time" content="2012-04-16T08:54:49+00:00"><meta property="article:modified_time" content="2012-04-16T08:54:49+00:00"><meta itemprop="name" content="Shutting Down Your Mac Safely"><meta itemprop="description" content="A few people have recently asked how Power Manager shuts down their Mac. Let's look at the two main shut down methods available and then how Power Manager strikes a balance between these two approaches."><meta itemprop="datePublished" content="2012-04-16T08:54:49+00:00"><meta itemprop="dateModified" content="2012-04-16T08:54:49+00:00"><meta itemprop="wordCount" content="660"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="Shutting Down Your Mac Safely"><meta name="twitter:description" content="A few people have recently asked how Power Manager shuts down their Mac. Let's look at the two main shut down methods available and then how Power Manager strikes a balance between these two approaches."><link rel="icon" type="image/png" href="/favicon.png"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><meta name="theme-color" content="#ffffff"></head><body class="section-blog"><nav class="mt-1"><div><a href="https://www.dssw.co.uk">DssW</a>
<button type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span></span></button><div id="navbarNav"><ul><li><a href="/about/">About</a></li><li><a class="active" aria-current="page" href="/blog/">News</a></li><li><a href="/products/">Products</a></li><li><a href="https://store.dssw.co.uk">Store</a></li><li><a href="/support/">Support</a></li></ul><form action="/search" role="search"><input type="search" name="q" placeholder="Looking for something?" aria-label="Search" aria-describedby="nav-btn-search">
<button id="nav-btn-search" type="submit">Search</button></form></div></div></nav><nav class="hierarchy" aria-label="breadcrumb"><ol><li><a title="News and Updates" href="/blog/">News</a></li><li class="active" aria-current="page">Shutting Down Your Mac Safely</li></ol></nav><main><section><h1>Shutting Down Your Mac Safely</h1><p class="lead">A few people have recently asked how Power Manager shuts down their Mac. Let's look at the two main shut down methods available and then how Power Manager strikes a balance between these two approaches.</p></section><div class="sections"><section><p>Many of the problems with automatically shutting down your computer come from poorly behaved applications or from applications stalling while they wait for some form of interaction.</p><p>There are two basic approaches to automatically shutting down your Mac. The first is to issue a shut down AppleEvent. The second method is to use the command line tool
<a href="https://www.dssw.co.uk/reference/shutdown/"><code>shutdown</code></a>.</p><p>Of these two methods, Apple recommends the first. In
<a href="https://web.archive.org/web/20230314023657/https://developer.apple.com/library/archive/qa/qa1134/_index.html">Q&amp;A1134</a>, Apple Developer Technical Support (DTS) recommend asking the System process to shut down through the kAEShutDown AppleEvent. This method mirrors what happens when you select Shut Down from the Finder’s Apple menu.</p><h3 id="shut-down-with-kaeshutdown">Shut Down with kAEShutDown</h3><p>Sending an AppleEvent to the System process requesting a shut down should completely power down your Mac. If all is well, your Mac will shut down in an orderly manner.</p><p>Problems arise with applications that need some interaction when they quit. Unsaved changes and running tasks that need to be stopped often end in dialog boxes asking where to save documents and “are you sure” alerts. These alerts will typically stop the shut down; in most cases leaving your Mac sitting with some applications quit and others still running.</p><p>With Mac OS X 10.7, aka Lion, Apple is moving towards an operating system design that can deal with applications seamlessly quitting and relaunching without user interaction. The design is not yet perfect and does not deal with every contingency but it is a step forward.</p><p>It is at this stage that problematic applications prompt people to look at the second shut down method. The second method is shutting down using the command line tool <code>shutdown</code>.</p><h3 id="shutdown--h-now">shutdown -h now</h3><p><a href="https://www.dssw.co.uk/reference/shutdown/"><code>shutdown</code></a> is a blunt tool that will in most cases shut down your Mac. It works at a layer below the Mac’s user interface and is roughly the equivalent of force quitting everything.</p><p>With <code>shutdown</code>, Mac applications that would have quit nicely are not given the chance. In most cases using <code>shutdown</code> should be fine but care needs to be taken about denying applications of the opportunity to quit nicely.</p><h3 id="power-manager">Power Manager</h3><p>Power Manager has evolved to do its very best to shut down your Mac in a Mac friendly way. Power Manager will force quit applications that threaten to block the automated shut down, but the force quit is only used after the application has been issued a friendly quit request.</p><p>Let’s walk through what happens when you ask Power Manager to shut down your Mac.</p><p>Power Manager is multiple user savvy and first deals with the logged in users. The following steps happen within each logged in user’s session:</p><ol><li>Running applications are sent a quit request.</li><li>Running applications are given time to quit.</li><li>If an application has not quit in time, the application is force quit.</li><li>With all the applications quit, the user is logged out.</li></ol><p>Once all the users are logged out, Power Manager then asks Mac OS X to shut down. You can watch this sequence play out in the transcripts of the Mac’s <code>system.log</code> file.</p><p>Power Manager’s shut down process is reliable, predictable, and Mac friendly.</p><h4 id="system-folder-applications">System Folder Applications</h4><p>There is one exception where Power Manager will not shut down your Mac. Power Manager will not force quit an application that lives within the <code>/System</code> folder. The contents of this folder are managed by Apple.</p><p>If an application within the System folder wants to stop your Mac shutting down, we decided it should be respected. Apple’s applications should be ideal Mac citizens and quit properly when requested; if they do not, then it hints at underlying problems that need to be addressed rather than masked.</p><h3 id="a-fine-balance">A Fine Balance</h3><p>Automatically shutting down your Mac is possible. Shutting down safely and predictably just takes some effort to get right.</p><p><a href="https://www.dssw.co.uk/powermanager/">Power Manager</a>’s approach is to allow Mac OS X to handle as much as possible. Where needed, Power Manager applies a light touch to make sure that applications that might cause problems are dealt with first.</p><nav class="nextprev"><ul><li>Next: <a href="/blog/2012-04-26-how-to-set-the-volume-when-logging-in/">How to Set the Volume When Logging In</a></li><li>Previous: <a href="/blog/2012-04-02-how-to-shut-down-your-mac-after-inactivity/">How to Shut Down Your Mac After Inactivity</a></li></ul></nav></section><aside><div class="metadata"><p>Published on 16 April 2012.</p><ul><li class="category">Design</li><li class="category">Power Manager/PM3</li><li class="category">Power Manager/PM4</li><li class="category">Power Manager</li><li class="tag">shut down</li></ul></div><div class="recent"><h3>Latest News</h3><ul><li><a href="/blog/2024-10-23-rollback/" title="Rolling Back">Rolling Back</a></li><li><a href="/blog/2024-10-14-sequoia/" title="Support for macOS 15 – Sequoia">Support for macOS 15 – Sequoia</a></li><li><a href="/blog/2024-05-02-scheduled-shut-down-macos/" title="Scheduling a Shut Down on macOS">Scheduling a Shut Down on macOS</a></li><li><a href="/blog/2023-08-25-power-manager-5-10-0-release/" title="Power Manager 5.10.0 Released">Power Manager 5.10.0 Released</a></li><li><a href="/blog/2023-04-21-power-manager-and-pmset/" title="Power Manager and pmset on macOS">Power Manager and pmset on macOS</a></li><li><a href="/blog/2023-04-20-scripted-licensing/" title="How to Script Power Manager Licensing">How to Script Power Manager Licensing</a></li><li><a href="/blog/2022-11-02-scripts-without-passwords/" title="Scripting without Passwords">Scripting without Passwords</a></li><li><a href="/blog/2022-10-25-energy-saver-schedule-ventura/" title="Missing Energy Saver Schedule in macOS 13">Missing Energy Saver Schedule in macOS 13</a></li><li><a href="/blog/2022-09-25-automatically-open-a-url/" title="How to Open a Link or URL">How to Open a Link or URL</a></li><li><a href="/blog/2022-08-15-apple-silicon/" title="Apple Silicon">Apple Silicon</a></li><li><a href="/blog/">More News and Updates…</a></li></ul></div></aside></div></main><footer><ul><li><a href="/readme/">Use and Privacy Policies</a></li><li><a href="https://www.dssw.co.uk">dssw.co.uk</a></li><li><a href="mailto:[email protected]">[email protected]</a></li></ul><p>Copyright © 1997 – 2024 Dragon Systems Software Limited (DssW). All rights reserved</p></footer></body></html>