Repository navigation
Commit 6e3e422
committed
darwin: stop calling SetApplicationIsDaemon()
It's been reported that calling this function causes the Core Graphics
framework to start reporting bogus values.
Commit 565cdd1 ('Revert "darwin: speed up uv_set_process_title()"')
attempted to fix this but apparently merely postponed the moment
when `CGDisplayPixelsWide()` and friends start reporting bogus values.
The Chromium code base mentions that calling `SetApplicationIsDaemon()`
prevents the HIServices framework from terminating the process when it
can't connect to launchservicesd.
Libuv itself doesn't use HIServices but it's possible that the libuv
user does. If said user doesn't call `SetApplicationIsDaemon()`, it's
possible this commit introduces an observable change in behavior.
The `SetApplicationIsDaemon()` call was introduced in commit 08e0e63
("darwin: avoid calling GetCurrentProcess") from October 2013 to work
around a bug in macos 10.9 where the Activity Monitor showed the program
as "Not responding."
Fixes: #2566 (for real, hopefully)
Fixes: nodejs/node#31328
PR-URL: #2593
Refs: https://cs.chromium.org/chromium/src/sandbox/mac/system_services.cc?l=26&rcl=a06d2fe5a279ddecd358d919d461080e2c53c92e
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 64e5a65 commit 6e3e422
1 file changed
Lines changed: 9 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 145 | | |
158 | 146 | | |
159 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
160 | 152 | | |
161 | 153 | | |
162 | 154 | | |
163 | 155 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 156 | | |
170 | | - | |
| 157 | + | |
171 | 158 | | |
172 | 159 | | |
173 | 160 | | |
| |||
178 | 165 | | |
179 | 166 | | |
180 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
181 | 172 | | |
182 | 173 | | |
183 | 174 | | |
| |||
0 commit comments