Commit 1f4cae8
committed
��runningServersForked should be read with runningServerReg held
The current code in `fork()` is racy in the sense that two concurrent go routines might call fork() at the same time, see that �runningServersForked is false and perform two forks. Holding runningServerReg makes sure that only one of the goroutines will see runningServersForked set to false.1 parent 2973141 commit 1f4cae8
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
419 | 422 | | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
424 | | - | |
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| |||
0 commit comments