[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: writing zero bytes in bash
- From: Miloslav Trmac <mitr volny cz>
- To: fedora-devel-list redhat com
- Subject: Re: writing zero bytes in bash
- Date: Sat, 26 Feb 2005 11:49:16 +0100
On Sat, Feb 26, 2005 at 09:39:42PM +1100, Russell Coker wrote:
> Actually I am not asking for a feature to be added, but for a feature to be
> removed. There is special-case code in bash if(size >0) write() and I am
> merely suggesting that the if statement be removed.
Really? My guess is actually something like this:
left = (len of data);
p = (start of data);
while (left != 0) {
r = write (fd, p, left);
if (r < 0) {
if (errno != EINTR) error;
r = 0;
}
p += r;
left -= r;
}
which "looks" perfectly natural.
Mirek
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]