[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Fw: Re: Reading from STDIN with the hang
From: |
Alexej Magura |
Subject: |
Re: [Chicken-users] Fw: Re: Reading from STDIN with the hang |
Date: |
Mon, 7 Apr 2014 01:47:18 -0600 |
using (with-stty ‘(echo) read-char) seems to have no affect. I still have to
press *enter* in order for SIGINT to kill the program, that is the program
still hangs on (read-char), even when it gets a SIGINT.
--
Alexej Magura
Sent with Airmail
On April 6, 2014 at 10:32:46 PM, John Cowan (address@hidden) wrote:
> Alexej Magura scripsit:
>
> > At the present, my current plan is to try rolling my own (read-char)
> > in C, since the one that comes with Chicken Scheme hangs until it
> > sees a carriage return.
>
> That's not Scheme, that's the way the terminal driver behaves. You need
> to use stty to change the terminal driver to return characters as
> soon as they are typed, and then read-char will do what you want it to.
>
> --
> John Cowan http://www.ccil.org/~cowan address@hidden
> 9I should say generally that that marriage was best auspiced, for the
> achievement of happiness, which contemplated a relation between a man and a
> woman in which the independence was equal, the dependence mutual, and the
> obligations reciprocal. --Louis Anspacher (1944)
>