- Notifications
You must be signed in to change notification settings - Fork5
Commitd0410d6
committed
Eliminate one background-worker-related flag variable.
Teach sigusr1_handler() to use the same test for whether a workermight need to be started as ServerLoop(). Aside from being perhapsa bit simpler, this prevents a potentially-unbounded delay whenstarting a background worker. On some platforms, select() doesn'treturn when interrupted by a signal, but is instead restarted,including a reset of the timeout to the originally-requested value.If signals arrive often enough, but no connection requests arrive,sigusr1_handler() will be executed repeatedly, but the body ofServerLoop() won't be reached. This change ensures that, even inthat case, background workers will eventually get launched.This is far from a perfect fix; really, we need select() to returncontrol to ServerLoop() after an interrupt, either via the self-pipetrick or some other mechanism. But that's going to require morework and discussion, so let's do this for now to at least mitigatethe damage.Per investigation of test_shm_mq failures on buildfarm member anole.1 parent513d06d commitd0410d6
1 file changed
+3
-4
lines changedLines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4752 | 4752 |
| |
4753 | 4753 |
| |
4754 | 4754 |
| |
4755 |
| - | |
4756 | 4755 |
| |
4757 | 4756 |
| |
4758 | 4757 |
| |
4759 | 4758 |
| |
4760 | 4759 |
| |
4761 | 4760 |
| |
4762 | 4761 |
| |
4763 |
| - | |
| 4762 | + | |
4764 | 4763 |
| |
4765 | 4764 |
| |
4766 | 4765 |
| |
| |||
4801 | 4800 |
| |
4802 | 4801 |
| |
4803 | 4802 |
| |
4804 |
| - | |
| 4803 | + | |
4805 | 4804 |
| |
4806 | 4805 |
| |
4807 |
| - | |
| 4806 | + | |
4808 | 4807 |
| |
4809 | 4808 |
| |
4810 | 4809 |
| |
|
0 commit comments
Comments
(0)