Closed alex-tee closed 3 years ago
reproc assumes that the exit code of processes on Windows is smaller than INT_MAX
. I guess bash is returning exit codes outside of that range. Maybe look into why bash is returning such a large exit code. We might have to change reproc to deal with exit codes outside of the range of an int to fix this in reproc itself.
A similar problem occurs on windows when a process returns a negative value (for example Clang). Since GetExitCodeProcess
will already retrieve an unsigned DWORD
, the assert ASSERT(status <= INT_MAX)
does not really make sense.
You're actually right, I was worried about overflowing the integer but the DWORD is really just an int under the covers since main() returns an int. I wonder if returning negative values is really best practice though. Regardless, I'll remove the assert shortly.
Fixed by removing the assert. Will release a new version sometime soon.
My unit tests on travis are failing with the following line on windows (msys):
https://travis-ci.org/github/zrythm/zrythm/jobs/727719758
this is what my test code is doing:
here is the function I'm testing:
any idea what this means?