From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: |& loses data (buffering bug?)
Date: Fri, 13 Feb 2004 16:30:31 +0100 [thread overview]
Message-ID: <20040213153031.GK27168@greux.loria.fr> (raw)
In-Reply-To: <20040213150016.1e64a843@tinky-winky>
On 2004-02-13 15:00:16 +0000, Peter Stephenson wrote:
> On Fri, 13 Feb 2004 15:43:11 +0100
> Vincent Lefevre <vincent@vinc17.org> wrote:
>
> > On 2004-02-13 14:33:59 +0000, Peter Stephenson wrote:
> > > Have you tried typing `F' in less? It could be the output is jerky
> > > and less hasn't actually read to the end of the file.
> >
> > This isn't related to the problem.
>
> Well, it's certainly *related*, unless I'm really missing the point. Do
> you mean the lines that are missing aren't at the end?
No, not at the end, just before or after the
cvs status: Examining o.alpha
cvs status: Examining o.linux
cvs status: Examining o.solaris
cvs status: Examining o.sunos
cvs status: Examining tests
block (that comes from stderr). And I have the same problem with grep
(see my example) -- but this may be normal in this case, as the output
may be fully buffered.
> > Anyway, I've tried and this doesn't solve anything, e.g.
>
> I don't understand what this example means. Where is the data missing here?
Some data from the "cvs status". The example with grep may be better
though (however I can no longer reproduce it).
> Can you get the same effect with e.g.
>
> perl -e 'open STDERR, ">&STDOUT";
> open STDIN, "cvs status|";
>
> exec "less";'
>
> which doesn't involve zsh at all?
It doesn't work either, but this is different: the stderr output is
completely missing.
I've done a "strace -f -o strace.out cvs status |& less" and I got:
[...]
===================================================================
File: zeta.c Status: Up-to-date
Working revision: 1.37
Repository revision: 1.37 /CVS/spaces/mpfr/zeta.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
cvs status: Examining o.alpha
cvs status: Examining o.linux
cvs status: Examining o.solaris
cvs status: Examining o.sunos
cvs status: Examining tests
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
===================================================================
File: tsub.c Status: Up-to-date
Working revision: 1.40
Repository revision: 1.40 /CVS/spaces/mpfr/tests/tsub.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
[...]
And strace.out contains:
[...]
4601 write(1, "\nFile: round_raw_generic.c\tStatu"..., 4096) = -1 EAGAIN (Resource temporarily unavailable)
4601 read(6, <unfinished ...>
4622 <... select resumed> ) = 1 (in [5])
4622 read(5, "!\f0\366$\215\237\333IW\v3\177\5\251Rn\5\240\322\267X\373"..., 8192) = 736
4622 select(10, [5 6], [8], NULL, NULL) = 1 (out [8])
4622 write(8, "\242r\340\24\302\356\307\201.\34#5\361\230\222\276?\247"..., 300) = 300
4601 <... read resumed> "\242r\340\24\302\356\307\201.\34#5\361\230\222\276?\247"..., 4096) = 300
4622 select(10, [5 6], [], NULL, NULL <unfinished ...>
4601 write(1, "\n\n Working revision:\t1.53\n R"..., 4096) = -1 EAGAIN (Resource temporarily unavailable)
4601 read(6, <unfinished ...>
4622 <... select resumed> ) = 1 (in [5])
4622 read(5, "\361\22V}jm\2\214\327jT\344LU\213\3241\365\6\375\312\032"..., 8192) = 832
4622 select(10, [5 6], [8], NULL, NULL) = 1 (out [8])
4622 write(8, "\242n\340\224\240\36.KF\262\301_\243\33b\251\321\301v\322"..., 334) = 334
4601 <... read resumed> "\242n\340\224\240\36.KF\262\301_\243\33b\251\321\301v\322"..., 4096) = 334
4622 select(10, [5 6], [], NULL, NULL <unfinished ...>
4601 write(1, "\n Sticky Tag:\t\t(none)\n Stick"..., 4096) = -1 EAGAIN (Resource temporarily unavailable)
4601 read(6, <unfinished ...>
4622 <... select resumed> ) = 1 (in [5])
4622 read(5, "`\302\215\274p?\376s93[\367\20cJ\304Cj\343\f\273e\246\030"..., 8192) = 1104
4622 select(10, [5 6], [8], NULL, NULL) = 1 (out [8])
4622 write(8, "\242n\0A\23\17\5\223\26x\327\357bYZ\10\267\221&\241\3\0"..., 497) = 497
4601 <... read resumed> "\242n\0A\23\17\5\223\26x\327\357bYZ\10\267\221&\241\3\0"..., 4096) = 497
4622 select(10, [5 6], [], NULL, NULL <unfinished ...>
4601 write(1, "\n\n=============================="..., 1350) = 1350
4601 write(2, "cvs status: Examining o.alpha", 29) = 29
4601 write(2, "\n", 1) = 1
4601 write(2, "cvs status: Examining o.linux", 29) = 29
4601 write(2, "\n", 1) = 1
4601 write(2, "cvs status: Examining o.solaris", 31) = 31
4601 write(2, "\n", 1) = 1
4601 write(2, "cvs status: Examining o.sunos", 29) = 29
4601 write(2, "\n", 1) = 1
4601 write(2, "cvs status: Examining tests", 27) = 27
4601 write(2, "\n", 1) = 1
4601 read(6, <unfinished ...>
4622 <... select resumed> ) = 1 (in [5])
4622 read(5, "\340X0MX[TaR!zP\\\300\20h\200\2g\231\270_\251\224\332y"..., 8192) = 688
4622 select(10, [5 6], [8], NULL, NULL) = 1 (out [8])
4622 write(8, "\242v \245 \355y$\243\32064\300?\301\7\224\307\334{\r\v"..., 267) = 267
4601 <... read resumed> "\242v \245 \355y$\243\32064\300?\301\7\224\307\334{\r\v"..., 4096) = 267
4622 select(10, [5 6], [], NULL, NULL <unfinished ...>
4601 write(1, "================================"..., 4096) = -1 EAGAIN (Resource temporarily unavailable)
4601 read(6, <unfinished ...>
4622 <... select resumed> ) = 1 (in [5])
4622 read(5, "N\17$\370\230\207 \304\35\201\261c\333\240\265\21U\207"..., 8192) = 1504
4622 select(10, [5 6], [8], NULL, NULL) = 1 (out [8])
4622 write(8, "\242v\30e\244&gS0|K\346\10@I2\304^\232\4\21\0\0\0\377\377"..., 626) = 626
4601 <... read resumed> "\242v\30e\244&gS0|K\346\10@I2\304^\232\4\21\0\0\0\377\377"..., 4096) = 626
4622 select(10, [5 6], [], NULL, NULL <unfinished ...>
4601 write(1, "\n Sticky Options:\t(none)\n\n===="..., 4096) = -1 EAGAIN (Resource temporarily unavailable)
[...]
With "strace -f -o strace2.out cvs status | cat", the write(1, ...)
calls return 4096 instead of -1.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
next prev parent reply other threads:[~2004-02-13 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-13 14:15 Vincent Lefevre
2004-02-13 14:33 ` Peter Stephenson
2004-02-13 14:43 ` Vincent Lefevre
2004-02-13 15:00 ` Peter Stephenson
2004-02-13 15:30 ` Vincent Lefevre [this message]
2004-02-13 15:44 ` Vincent Lefevre
2004-02-13 16:12 ` Peter Stephenson
2004-02-13 16:17 ` Vincent Lefevre
2004-02-13 17:33 ` Vincent
2004-02-14 11:32 ` Vincent Lefevre
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040213153031.GK27168@greux.loria.fr \
--to=vincent@vinc17.org \
--cc=zsh-users@sunsite.dk \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).