Commit 6e734dc
committed
unix: Enable exit code handling for sys.exit().
Enable MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING to propagate sys.exit()
exit codes properly. Update convert_pyexec_result() to handle return
values where pyexec returns the exit code with PYEXEC_FORCED_EXIT flag
set for SystemExit. Extract the exit code from the lower 8 bits when
the flag is set, otherwise return as-is (0 for success, 1 for exception).
Signed-off-by: Andrew Leech <[email protected]>1 parent a2b2e9d commit 6e734dc
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
239 | 250 | | |
240 | 251 | | |
241 | 252 | | |
| |||
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| 259 | + | |
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
0 commit comments