help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: wait does not perform as expected
Date: Thu, 23 Feb 2023 21:31:52 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2023-02-23 20:47, Daniel Gaudry wrote:

> Hi,
> On my ubuntu system the
> just pause the program regardless of any key being hit.

Hmm... it occurred to me to try to execute the program under GPS, not in 
a shell window.

If I run a Get_Immediate loop under GPS, within the input-output window 
of GPS, there is /no reaction/ to keystrokes until I press Return/Enter. 
Get_Immediate returns Available => False until Return/Enter is pressed, 
after which it returns the characters typed before Return/Enter, one by 
one in order.

So it seems that, on my system, Get_Immediate cannot disable the 
line-buffering of the standard-input "terminal", but must wait for 
Return/Enter until it sees any input. And line-editing too is still 
active under Get_Immediate, when running within GPS.

I am starting to suspect that the behaviour I see in my shell command 
window may be due partly to the terminal emulator that implements such 
windows on my system (MacOS "Terminal" app).

Daniel, how are you compiling and running your code? Under GPS, in a 
shell window, or in some other way (shell script)?

If you have been running within GPS, try to run your program in a normal 
shell command window.

  parent reply	other threads:[~2023-02-23 19:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 16:34 wait does not perform as expected Daniel Gaudry
2023-02-22 17:36 ` Niklas Holsti
2023-02-23 14:26   ` AdaMagica
2023-02-23 14:32     ` AdaMagica
2023-02-23 14:33     ` Daniel Gaudry
2023-02-23 14:39       ` AdaMagica
2023-02-23 17:15       ` Niklas Holsti
2023-02-23 17:35     ` Niklas Holsti
2023-02-23 17:49       ` Niklas Holsti
2023-02-23 18:14       ` Dmitry A. Kazakov
2023-02-23 18:29         ` Niklas Holsti
2023-02-23 18:47           ` Daniel Gaudry
2023-02-23 19:08             ` Niklas Holsti
2023-02-23 19:31             ` Niklas Holsti [this message]
2023-02-23 20:41           ` Dmitry A. Kazakov
2023-02-24 15:10             ` AdaMagica
2023-02-24 18:23               ` Niklas Holsti
2023-02-24 21:16 ` Jeffrey R.Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox