Unexpected zero return code from `throw std::runtime_error`
Csaba Raduly
rcsaba@gmail.com
Sat Jul 2 22:37:04 GMT 2022
On Sat, 2 Jul 2022 at 23:34, Adam Dinwoodie wrote:
>
> That's definitely closer to the behaviour I'd expect! I don't think it
> should be dumping a core, though, at least based on the behaviour I see
> on Debian.
It should be dumping core, because std:terminate() calls abort(), as
Joost has explained earlier.
> I'd like to have a look at what's different about your environment;
> could you share the output from `cygcheck -srv >cygcheck.out` on your
> system?
Attached.
>
> `(( rc == 0 ))` is comparing the value of `$rc` against the number 0;
> the `$` isn't necessary in `(( ... ))` tests. `(( rc == 0 ))` is
> essentially identical to `[[ $rc -eq 0 ]]`.
>
> Your change means the comparison is done as a string comparison rather
> than a numeric comparison. That doesn't make any difference here: '0'
> is '0' regardless of whether you're testing it as a number or as a
> string.
Shows how much I know about shell scripting :)
Csaba
--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 70784 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20220703/30f1b252/attachment-0001.obj>
More information about the Cygwin
mailing list