[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[kahua-dev:00750] Re: Gauche 0.8.1 で kahua-shell のテストが停止してしまう
あ、0.8.1で入力ポートのバッファリングのコードをいじりました。
そのせいかも。 これ↓
2004-07-16 Shiro Kawai <shiro@xxxxxxx>
* src/port.c (bufport_fill): somehow it called filler() with
minimum buffer size when the buffering mode is PORT_BUFFER_LINE.
It should be able to use maximum buffer size---only PORT_BUFFER_NONE
need to fetch minimum chunk at a time.
ちょっと帰ったら見てみます。とりあえずshell-inのbuffering modeを
noneにしたら回避できるんじゃないかな。
(Yahooアカウントからなので、kahua-devにポストできないかも。
そしたら転送してください>nobsun)
--shiro
--- Nobuo Yamashita <nobsun@xxxxxxxxxx> からのメッセージ:
>
> Gauche 0.8 まではそのようなことはなかったのですが、
> Gauche 0.8.1 で test/shell.scm がスタックしてしまいます。
>
> shell.scm の以下のテスト部分の (read-block 1000 (shell-in)) のところで
> スタックしてしまいます。read-block が指定したバイト数のデータあるいは EOF
> を待っているように見えます。
>
> (test* "shell: login" "select wno> "
> (begin
> (recv)
> (send 'gandalf)
> (sys-sleep 1)
> (recv)
> (send 'friend)
> (sys-sleep 1)
> (read-line (shell-in))
> (sys-sleep 1)
> (read-line (shell-in))
> (sys-sleep 1)
> (string-incomplete->complete (read-block 1000 (shell-in)))
> ))
>
>
> (read-block 12 (shell-in)) のように、実際にバッファにあるであろう
> バイト数以下の数字を指定すると予想どおり、スタックしません。
>
> で、直前の行に
> #?=(port-type (shell-in))
> #?=(port-buffering (shell-in)) を入れると、それぞれ、
> :file と :modest になっています。
>
> さらに不思議なことに、その直後のテスト
>
> (test* "shell: select worker" #f
> (begin
> (sys-sleep 1)
> (send '0)
> (sys-sleep 1)
> (not
> (#/hello/
> (string-incomplete->complete (read-block 1000 (shell-in)))
> )))
> )
>
> や、それに続く、テスト
>
> (test* "shell: evaluation" "#<module #>"
> (begin
> (sys-sleep 1)
> (send '(current-module))
> (sys-sleep 1)
> (car (string-split
> (string-incomplete->complete (read-block 1000 (shell-in)))
> "\n"))
> )
> )
>
> ではスタックが起こりません。とりあえず、現象だけの報告です。
>
> --nobsun