[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gforth] errno weirdness
From: |
Reepca Russelstein |
Subject: |
Re: [gforth] errno weirdness |
Date: |
Thu, 26 Oct 2017 14:32:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Anton Ertl <address@hidden> 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