On Mon, Jan 30, 2012 at 9:17 AM, David T. Lewis
<lewis@mail.msen.com> wrote:
On Mon, Jan 30, 2012 at 07:44:40AM -0300, Guillermo Polito wrote:
> FileStream stdout nextPutAll: 'something';crlf.
>
> Works great, but
>
> FileStream stdin next.
>
> Never returns :/. �Whatever I try.
>
> Any idea?
>
This is because no data was received on the standard input stream. Try
typing something followed by <enter> so that the operating system terminal
actually sends some data.
I did :/.� I always open my images from the terminal.� And the stdout prints in the terminal where I've opened the image.� But when if I use stdin and write to that console, it does not work :/.
However, if I do this with fgets+FFI it works... (It blocks but when I enter data into the terminal the control is returned to the image).
By default, the stdin, stdout, and stderr streams are all in blocking mode
unless you set them otherwise. If you want to set the stdin to nonblocking
mode, see #setNonBlocking in package OSProcess. Note that there is no
"correct" setting for this, it depends on what you are trying to do with
the stream.
HTH,
Dave
�
Thanks!