Re: a problem with linux 2.6.11 and sa

From: Paul Jarc
Date: Wed Mar 16 2005 - 17:40:58 EST


"George Georgalis" <george@xxxxxxxxx> wrote:
> On Wed, Mar 09, 2005 at 06:28:35PM -0500, Paul Jarc wrote:
>> To simplify, what about these two:
>> mplayer foo.mpg
>> mplayer foo.mpg < mediafiles.txt
>
> The particular host does not have X support so mpg is out.

Well, use any one of the files listed in mediafiles.txt. I expect the
first one would behave the same as your for loop, and the second would
behave the same as your while loop.

> I'm not sure that that test would work as mplayer requires filenames
> as command arguments not stdin (exclusivly, I think);

Note that I said to redirect input from mediafiles.txt, not from any
of the filenames listed in it, but one of the files listed in it
should also be passed ion the command line in both cases.

Your test also had mplayer's stdin connected to mediafiles.txt. It
was just less explicit - mplayer inherits stdin from surrounding loop.
So I'm suggesting simplifying the test so that stdin is the *only*
difference between the two cases, and that will show whether it's
relevant. OTOH, if you can't reproduce the problem with the
simplified pair of tests, then some interaction with the shell loops
must be involved.

> this works fine
> mplayer `cat zz.mtest `
>
> Then I tried
> mplayer /dev/stdin <zz.mtest

In the first case, mplayer is processing the files listed in
zz.mtest. In the second case, it's processing zz.mtest itself. So
it's not surprising that you get different results here.

> Then I tried
> while read file; do mplayer "$file" ; done <zz.mtest

What's in zz.mtest? E.g., if it contains a line "-", then that will
tell mplayer to play the file on stdin, which in this case is
zz.mtest. Choosing one of the listed files and testing with that, as
I suggested above, will eliminate this possibility.


paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/