From: Nala Ginrut <nalaginrut@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] Fix get-bytevector-all read redundant eof
Date: Sat, 16 Mar 2013 12:25:57 +0800 [thread overview]
Message-ID: <1363407957.3025.39.camel@Renee-desktop.suse> (raw)
In-Reply-To: <87k3p8z7f4.fsf@tines.lan>
On Fri, 2013-03-15 at 17:20 -0400, Mark H Weaver wrote:
> Nala Ginrut <nalaginrut@gmail.com> writes:
>
> > On Thu, 2013-03-14 at 17:30 +0800, Nala Ginrut wrote:
> >> Attached the patch to fix get-bytevector-all.
> >> You may check it like this:
> >> (get-bytevector-all (current-input-port))
> >>
> >> And try to input then type ctrl+d, the current implementation needs you
> >> type ctrl+d twice.
> >>
> >> Regards.
> >
> >
> > Sorry, but I realized that this patch only fixed when you type ctrl+d in
> > the beginning. But if you input something, the problem is still there.
> > I'll look deeper.
>
> FWIW, I suspect you'll have to dig fairly deep to fix this properly.
> AFAIK, the ports code was not designed to ensure that exactly one EOF is
> reported to the user for each EOF returned by the kernel. I hope to
> look into this soon (possibly before 2.0.8), as part of my investigation
> of <http://bugs.gnu.org/12216>.
>
Yes, I tried the bug-demo code of dwheeler, and found that EOF seems was
eaten in somewhere.
I read the code on the calling-tree of scm_peek_char, but hardly find
the problem related.
Maybe it's something about the 'port' implementation?
> Thanks,
> Mark
next prev parent reply other threads:[~2013-03-16 4:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 9:30 [PATCH] Fix get-bytevector-all read redundant eof Nala Ginrut
2013-03-15 8:39 ` Nala Ginrut
2013-03-15 21:20 ` Mark H Weaver
2013-03-16 4:25 ` Nala Ginrut [this message]
2013-04-01 1:18 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363407957.3025.39.camel@Renee-desktop.suse \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).