On 2013-03-03 23:30 +0100, Sven Joachim wrote:

> On 2013-03-03 22:50 +0100, Daniel Dickinson wrote:
>
>> On 03/03/13 03:23 AM, Sven Joachim wrote:
>>> 
>>> Does the following script work for you?  If not, can you run it under
>>> "strace -f" to see what goes wrong?
>>> 
>>
>> That scripts works for me in an xfce4-terminal right now, however when I
>> tried it when the error was occurring (before I submitted the bug
>> report), it did not, so I am rather puzzled.  There is apparently some
>> change in my environment for reasons that make no sense to me (as in I
>> don't know where to start looking; nothing in env or set from the
>> affected -el scripts shows anything that stands out and stdin should
>> come from the <<EOF).
>
> Maybe this is something fishy with the 9p filesystem, I found a
> message[1] on the arch-general list mentioning the same error message as
> yours.

I poked a little around in the bash and cat source code, and this is
what they are doing here:

- bash writes the text in the heredoc to a temporary file, unlinks that
  file (so that nobody can mess around it) and sets standard input for
  cat to a file descriptor pointing to that file.

- cat runs fstat(2) on that file descriptor; it does so for both input
  and output in order to detect whether they are the same.  However,
  fstat() fails with ENOENT and cat errors out.

Why would fstat() ever return ENOENT?  This makes no sense to me.

Cheers,
       Sven


> 1. https://mailman.archlinux.org/pipermail/arch-general/2011-July/021195.html


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to