bugGforth - Bugs: bug #66110, Gforth hangs at the end of the...

 
 

bug #66110: Gforth hangs at the end of the input source

Submitter:  Ruvim <ruv>
Submitted:  Mon 19 Aug 2024 05:01:08 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  paysan
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Aug 2024 10:46:22 AM UTC, comment #5: 

I can confirm this bug, and it's not behaving as expected.  EKEY should return K-EOF in that case, and the terminal read code should terminate Gforth.  With the exception of Android, where stdin delivers EOF all the time, and that shouldn't confuse Gforth.

Bernd Paysan <paysan>
Group administrator
Mon 19 Aug 2024 08:07:37 PM UTC, comment #4: 

comment #3:

> After trying 0.7.3 I see it does exit, after the copyright line.
>
> What version are you using?
>


Tested in:

- gforth 0.7.9_20230921 amd64
- gforth 0.7.9_20240817 amd64

Then it looks like a regression.

Ruvim <ruv>
Mon 19 Aug 2024 07:30:54 PM UTC, comment #3: 

"Could you convince me?  Why should..."
Should or shouldn't, there could be arguments either way, I won't try to convince. It's up to the author; I don't know if it's documented either way. 
After trying 0.7.3 I see it does exit, after the copyright line.

What version are you using?

Carl Hansen <carlh>
Mon 19 Aug 2024 06:51:41 PM UTC, comment #2: 

comment #1:

> echo ' 123 . bye ' | gforth
> Change your expectations.


Could you convince me?  Why should the Forth system's text interpreter continue to run when the end of the input source is reached?

Ruvim <ruv>
Mon 19 Aug 2024 05:39:57 PM UTC, comment #1: 

echo ' 123 . bye ' | gforth
Change your expectations.

Carl Hansen <carlh>
Mon 19 Aug 2024 05:01:08 PM UTC, original submission:  

The Gforth process continues running when the input source (that is stdin) is exhausted.

Test case:

  echo ' 123 . ' | gforth


Expected behavior: the Gforth process prints "123" and exits.

Actual behavior: the Gforth process prints a copyright text, "123", and continues running.

Ruvim <ruv>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by paysan (Posted a comment)
  • -email is unavailable- added by carlh (Posted a comment)
  • -email is unavailable- added by ruv (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-11-17 paysan Open/ClosedOpen Closed
    2024-08-20 paysan StatusNone Fixed
        Assigned toNone paysan

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code