| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -371,6 +371,9 @@ priority classes, `priority` is mapped to one of six priority constants in | |||
| 371 | 371 | mapping may cause the return value to be slightly different on Windows. To avoid | |
| 372 | 372 | confusion, it is recommended to set `priority` to one of the priority constants. | |
| 373 | 373 | ||
| 374 | + On Windows setting priority to `PRIORITY_HIGHEST` requires elevated user, | ||
| 375 | + otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. | ||
| 376 | + | ||
| 374 | 377 | ## os.tmpdir() | |
| 375 | 378 | <!-- YAML | |
| 376 | 379 | added: v0.9.9 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,8 +116,10 @@ function checkPriority(pid, expected) { | |||
| 116 | 116 | return; | |
| 117 | 117 | } | |
| 118 | 118 | ||
| 119 | + // On Windows setting PRIORITY_HIGHEST will only work for elevated user, | ||
| 120 | + // for others it will be silently reduced to PRIORITY_HIGH | ||
| 119 | 121 | if (expected < PRIORITY_HIGH) | |
| 120 | - assert.strictEqual(priority, PRIORITY_HIGHEST); | ||
| 122 | + assert.ok(priority === PRIORITY_HIGHEST || priority === PRIORITY_HIGH); | ||
| 121 | 123 | else if (expected < PRIORITY_ABOVE_NORMAL) | |
| 122 | 124 | assert.strictEqual(priority, PRIORITY_HIGH); | |
| 123 | 125 | else if (expected < PRIORITY_NORMAL) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments