Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (e541968349f5b85e4be5bfc9ba8e65bf4534d827)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: flux <flux AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (e541968349f5b85e4be5bfc9ba8e65bf4534d827)
  • Date: Mon, 10 Nov 2008 12:21:47 -0500

Jaka Kranjc wrote [08.11.10 07:56]:
> Yes, it isn't completely deterministic.
>
> Running this I see only zeros printed:
> while true; do ls -R . > FILE; cat FILE | sed -e 's/man1/ELSE/' > FILE; wc
> -l
> FILE; rm FILE; done
> 0 FILE
> 0 FILE
>
> But if I omit that, almost full file copies get through:
> while true; do ls -R . > FILE; cat FILE | sed -e 's/man1/ELSE/' > FILE; wc
> -l
> FILE; rm FILE; done | grep -v "0 FILE"
> 4482 FILE
> 4482 FILE
>
> The full line count is 4660. When using more or less instead of cat, the
> output is much more random. Extending the pipe gives me an empty file
> pretty
> consistently.

Is this a bug in the pipe implementation(s) then? It seems that the
variability comes from the pipes (plain redirection I know about), but
I thought that that the process being piped to was supposed to wait on
the process being piped from. If all processes in pipes were supposed to
run in parallel, then it would make sense, but this seems silly. So much
for my "pipe dream". :-P

--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org

Attachment: pgpemWzcDA26k.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page