Commit 5ad5adb
Fix/shutdown (#35)
* Update Cargo.toml, README, and CONTRIBUTING link for better documentation and accessibility 🦜🕺 (#32)
* Update the mod in src
* Add shutdown logger
* Add the handler for shutdown
* Use libc to handle unix
* Add shutdown.rs
* Update the mod in src
* Add the handler for shutdown
* Use libc to handle unix
* Fix shutdown module compilation error
* Fix shared reference in unix
* Fix shared reference in unix
* Access the global without shared reference
* Fix temporary value errors in shutdown.rs
* Simplified exit logic in unix
Add force quiting for repeatedly ctrl+c press
* Move close logic to main thread.
* Change signal handling and add safety checks to avoid UB
* Basic implementation to force the awake of listener thread.
this will attempt to connect to itself to wake the listener and check if
the flag is set to false
* Refactor to reach scalability and security in unix sign handler
* Add setup for graceful shutdown
---------
Co-authored-by: LoboGuardian 🐺 <[email protected]>
Co-authored-by: miky-rola <[email protected]>1 parent c5a3804 commit 5ad5adb
File tree
7 files changed
+330
-74
lines changed- src
- hteapot
7 files changed
+330
-74
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | | - | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
98 | 120 | | |
99 | 121 | | |
100 | 122 | | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
| 126 | + | |
| 127 | + | |
104 | 128 | | |
105 | 129 | | |
106 | 130 | | |
| |||
109 | 133 | | |
110 | 134 | | |
111 | 135 | | |
| 136 | + | |
| 137 | + | |
112 | 138 | | |
113 | 139 | | |
114 | 140 | | |
| |||
132 | 158 | | |
133 | 159 | | |
134 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
135 | 165 | | |
136 | 166 | | |
137 | 167 | | |
138 | 168 | | |
| 169 | + | |
139 | 170 | | |
140 | 171 | | |
141 | 172 | | |
142 | 173 | | |
143 | 174 | | |
144 | 175 | | |
145 | 176 | | |
146 | | - | |
147 | 177 | | |
148 | 178 | | |
149 | | - | |
| 179 | + | |
| 180 | + | |
150 | 181 | | |
151 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
152 | 189 | | |
153 | 190 | | |
154 | 191 | | |
| |||
185 | 222 | | |
186 | 223 | | |
187 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
188 | 236 | | |
189 | 237 | | |
190 | 238 | | |
| |||
216 | 264 | | |
217 | 265 | | |
218 | 266 | | |
219 | | - | |
220 | 267 | | |
221 | | - | |
222 | | - | |
223 | 268 | | |
224 | 269 | | |
225 | 270 | | |
226 | 271 | | |
| 272 | + | |
227 | 273 | | |
228 | 274 | | |
229 | | - | |
230 | 275 | | |
231 | 276 | | |
232 | 277 | | |
| |||
286 | 331 | | |
287 | 332 | | |
288 | 333 | | |
289 | | - | |
290 | | - | |
| 334 | + | |
291 | 335 | | |
292 | 336 | | |
293 | 337 | | |
| |||
390 | 434 | | |
391 | 435 | | |
392 | 436 | | |
393 | | - | |
| 437 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | | - | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
136 | | - | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
151 | 159 | | |
152 | 160 | | |
153 | 161 | | |
154 | | - | |
| 162 | + | |
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| |||
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
242 | | - | |
| 249 | + | |
| 250 | + | |
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
| |||
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
258 | | - | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
263 | | - | |
| 270 | + | |
264 | 271 | | |
265 | 272 | | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
269 | | - | |
| 276 | + | |
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
274 | | - | |
| 281 | + | |
0 commit comments