bug-gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62030] 'Malformed xchar' error, if fork'ed child throws


From: Bernd Paysan
Subject: [bug #62030] 'Malformed xchar' error, if fork'ed child throws
Date: Fri, 11 Feb 2022 07:48:40 -0500 (EST)

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]