Commit e6bf38b
Suppress console window pop-ups on Windows for scribe_cat and commit cloud subscriber
Summary:
On Windows, background source-control telemetry and the commit cloud subscriber daemon were spawning child processes without the `CREATE_NO_WINDOW` creation flag, so a console window flashed on the user's desktop on every spawn — when running source control, and even while the machine was otherwise idle (the commit cloud subscriber fires `hg cloud sync` on notifications).
Two crates were affected:
`scribe_cat` only applied `CREATE_NO_WINDOW` on the rarely-used orphaned path. The default (non-orphaned) `offer`, `blocking_put`, and the pooled `ScribeCatPool::spawn_process` all spawned `scribe_cat.exe` with no creation flags, flashing a window for ordinary telemetry. This adds a shared `apply_creation_flags` helper that always sets `CREATE_NO_WINDOW` on Windows, plus `CREATE_NEW_PROCESS_GROUP` only when orphaning, and routes every spawn path through it.
`commitcloudsubscriber` spawned `hg cloud sync` (`action.rs`) and `clicat`/`corp_clicat` (`util.rs`) with no creation flags. This adds a shared `hide_console_window` helper that sets `CREATE_NO_WINDOW` on Windows and routes both spawns through it.
All changes are no-ops on non-Windows platforms.
Reviewed By: metacpp
Differential Revision: D109767752
fbshipit-source-id: 9013efe976a12a7dc597c057f904d75b111fbfa91 parent 0abea02 commit e6bf38b
2 files changed
Lines changed: 36 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
37 | 54 | | |
38 | 55 | | |
39 | 56 | | |
| |||
211 | 228 | | |
212 | 229 | | |
213 | 230 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
227 | 245 | | |
228 | 246 | | |
229 | 247 | | |
| |||
0 commit comments