Re: errno weirdness

Reepca Russelstein <[email protected]>
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <[email protected]>
Anton Ertl <anton-8NJIiSa5LzB3ZGU3T6kWFyEcasqEdqbRs2V0tQ3P5b8@public.gmane.org> writes:
> I guess that, in your usage (a use case would be nice for reproducing
> the problem), Gforth calls some other function in between that sets
> errno to its error result.

To reproduce:

require unix/libc.fs
0 1 0 poll errno .s

should show -1 14 on the stack (on my system at least), but shows -1 0
instead.

(took me awhile to find a function and usage from libc.fs that would
error 100% of the time - there's always that edge case where someone
actually has "/argle" and "/blargle" files).

> I have implemented solution 2, but am too lazy to design a proper test
> case, so please go ahead and try it.

Just did, it works, though I had to change execute to int-execute in
interpret1 in kernel/int.fs first.

Thanks!

- reepca
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.