Re: [PATCH] bundle, fast-import: detect write failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 10 Jan 2008, Jim Meyering wrote:

> I noticed some unchecked writes.  This fixes them.

Thank you.

However, you also have this:

> -	close(keep_fd);
> +	if (close(keep_fd))
> +		die("failed to write keep file");

I recently read an article which got me thinking about close().  The 
author maintained that many mistakes are done by being overzealously 
defensive; die()ing in case of a close() failure (when open() succeeded!) 
might be just wrong.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux