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: Stephan Rudlof
Subject: [bug #62030] 'Malformed xchar' error, if fork'ed child throws
Date: Sun, 13 Feb 2022 12:04:12 -0500 (EST)

Follow-up Comment #8, bug #62030 (project gforth):

[comment #7 comment #7:]
> bye and (bye) are for leaving Gforth gracefully (the difference is that
(bye) is a primitive).  This means restoring the terminal.  The thing we don't
want.  So we want to leave the forked process right at that point, not
graceful, not restoring things, not closing and flushing files like the
history buffer.

OK.

Possibly the wrong place to ask here, but nevertheless...

Using gforth v0.7.3 command history - by keyboard arrow-up - resulting after
multiple CLI calls of buz mixed with other commands becomes messy:

: buz
    5 0 do
        fork-ec \ (imported) C fork() with err handling
        if \ child pid -> parent, or ..
            
        else \ .. 0 -> child
            history-cold
            \ needed to get normally working terminal (after finishing child)
            stdin close-file throw \ or 'sh stty -icanon' in parent bye...
            stdout close-file throw
            5 0 do
                1000 ms
                LI_foo \ writes to stderr
            loop
            7 exit() \ (bye)
        then
    loop
;


Any idea?
Looks like forked procs do something with command history in spite of
'history-cold'...

    _______________________________________________________

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]