[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
minor bug in bash
From: |
Zachary Miller |
Subject: |
minor bug in bash |
Date: |
Tue, 17 Jan 2012 18:04:19 -0600 |
User-agent: |
Mutt/1.4.2.2i |
hello,
i would like to report a what i believe to be a minor bug in bash 4.2 that has
to do with file redirection:
in redir.c:356 (function write_here_document()), this block of code:
if (write (fd, document, document_len) < document_len)
{
if (errno == 0)
errno = ENOSPC;
return (errno);
}
else
return 0;
checks for a short write() but doesn't retry writing the remainder of the bytes
(and in fact returns ENOSPC instead, even though no error has yet occurred).
according to the man page for write(2), fewer bytes may be written and this is
not by itself an error.
thanks!
cheers,
-zach
- minor bug in bash,
Zachary Miller <=