Follow-up Comment #3, bug #62030 (project gforth):
The way to do this in the current Gforth development version is by:
require unix/libc.fs
: test fork() if ( ... )
else [: ( ... ) ;] catch ?dup-if DoError 1 else 0 then
exit()
then ;
fork() and exit() as C functions have deliberately () so they don't conflict
with Forth words with the same name.
You are supposed to catch whatever you do in the forked version, as otherwise,
it will return to the QUIT loop. Closing stdin as a workaround used to work,
but it doesn't look right.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62030>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/