Commit 34bf9a7
committed
Fix #467: TTY services stuck in restart state after non-zero exit
When a TTY exited with non-zero code (e.g., user with shell=/sbin/false),
it would enter restart state but never recover, requiring manual restart.
The throttling logic from commit f0032ab had two issues:
1. Duplicate exit code check in service_retry() created infinite timer loop
2. TTYs lacked default restart_tmo, causing timer to never start
Fix by removing duplicate check and ensuring TTYs get a 2-second default
restart_tmo for proper throttling.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>1 parent bb111f9 commit 34bf9a7
1 file changed
Lines changed: 14 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2194 | 2194 | | |
2195 | 2195 | | |
2196 | 2196 | | |
| 2197 | + | |
2197 | 2198 | | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2204 | 2205 | | |
2205 | 2206 | | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
2206 | 2211 | | |
2207 | 2212 | | |
2208 | 2213 | | |
| |||
2631 | 2636 | | |
2632 | 2637 | | |
2633 | 2638 | | |
2634 | | - | |
2635 | 2639 | | |
2636 | 2640 | | |
2637 | 2641 | | |
| |||
2641 | 2645 | | |
2642 | 2646 | | |
2643 | 2647 | | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
2647 | 2651 | | |
2648 | | - | |
2649 | | - | |
2650 | | - | |
2651 | | - | |
2652 | | - | |
2653 | | - | |
2654 | | - | |
2655 | 2652 | | |
2656 | 2653 | | |
2657 | 2654 | | |
| |||
0 commit comments