RFC: ldconfig speedup
Jim Meyering
jim@meyering.net
Tue Jul 3 09:58:00 GMT 2007
Andreas Jaeger <aj@suse.de> wrote:
> I've fixed a few comments and whitespace problems and have appended the
> current version for review again.
>
> Ok to commit?
> Andreas
...
> + /* Create file. */
> + fd = open (temp_name, O_CREAT|O_WRONLY|O_TRUNC|O_NOFOLLOW,
> + S_IROTH|S_IRGRP|S_IRUSR|S_IWUSR);
> + if (fd < 0)
> + error (EXIT_FAILURE, errno,
> + _("Can't create temporary auxiliary cache file %s"),
> + temp_name);
> +
> + if (write (fd, aux_file_entries, aux_file_entries_size)
> + != (ssize_t) aux_file_entries_size)
> + error (EXIT_FAILURE, errno,
> + _("Writing of auxiliary cache data failed"));
> +
> + if (write (fd, strings, total_strlen) != (ssize_t) total_strlen)
> + error (EXIT_FAILURE, errno, _("Writing of auxiliary cache data failed"));
> +
> + close (fd);
Hi Andreas,
You checked most other syscall return values (including the writes to "fd"),
but don't you want to check for close failure on this just-written
file descriptor?
Jim
More information about the Libc-alpha
mailing list