Commit 7967ff8
authored
fix: enforce single-instance using QLockFile (#117)
* fix: enforce single-instance using QLockFile
Uses Qt's cross-platform QLockFile to prevent multiple instances of
aw-qt from running simultaneously. When a second launch is attempted,
it logs a warning (including the PID of the existing instance) and
exits with code 1.
Testing mode gets its own lock file so it doesn't conflict with a
normal production instance.
Fixes ActivityWatch/activitywatch#1176
* fix(ci): unpack 4 values from getLockInfo() and fix macOS runner name
* ci: switch to macos-14 runner (macos-13 config deprecated)1 parent 1cde7bf commit 7967ff8
1 file changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
20 | 50 | | |
21 | 51 | | |
22 | 52 | | |
| |||
56 | 86 | | |
57 | 87 | | |
58 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
59 | 92 | | |
60 | 93 | | |
61 | 94 | | |
| |||
0 commit comments