Commit 3d50dfd
In Docker containers, PID namespaces reset on restart, so the new
`astro dev` process often inherits the same PID the old one had. The
lock file from the previous run persists, and the process detects
itself as the "already running" server.
Add a self-PID guard to `isLockFileProcessAlive()`: if the lock file's
PID matches `process.pid`, treat it as stale immediately. The current
process cannot be the server recorded in the lock file because it
hasn't started one yet.
Co-authored-by: factory[bot] <factory[bot]@users.noreply.github.com>
1 parent c7811b8 commit 3d50dfd
4 files changed
Lines changed: 53 additions & 5 deletions
File tree
- .changeset
- packages/astro
- src/core/dev
- test/units/dev
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
| |||
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
234 | 263 | | |
235 | 264 | | |
236 | 265 | | |
237 | 266 | | |
238 | | - | |
| 267 | + | |
239 | 268 | | |
240 | 269 | | |
241 | | - | |
242 | | - | |
| 270 | + | |
| 271 | + | |
243 | 272 | | |
244 | 273 | | |
245 | 274 | | |
| |||
249 | 278 | | |
250 | 279 | | |
251 | 280 | | |
252 | | - | |
| 281 | + | |
253 | 282 | | |
254 | 283 | | |
255 | 284 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments