<div dir="ltr">I don't know why we get away with this on Linux, but macOS really<br>means business with the "values of objects of automatic storage<br>invocation duration that do not have the volatile type and have<br>been changed between the setjmp() invocation and longjmp() call are<br>indeterminate" thing, leading to bad fds and a bad pid. Using<br>volatile causes lots of warnings about passing `volatile int*`<br>instead of `int*`, so it's a smaller change to move the fields into<br>TT (and avoid the "automatic storage" part) than it is to add the<br>`volatile` modifier.<br><br>Four timeout tests fail on macOS (both locally and on github's CI)<br>without this patch, and all timeout tests pass on macOS with this<br>patch.<br>---<br> toys/other/timeout.c | 18 +++++++++++-------<br> 1 file changed, 11 insertions(+), 7 deletions(-)<br><br></div>