This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: ldconfig speedup
- From: Jim Meyering <jim at meyering dot net>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: "GNU C. Library" <libc-alpha at sources dot redhat dot com>, Michael Schroeder <mls at suse dot de>
- Date: Tue, 03 Jul 2007 11:58:33 +0200
- Subject: Re: RFC: ldconfig speedup
- References: <20070627190237.3CF8A4D05E6@magilla.localdomain> <m3y7i5yzjk.fsf@gromit.moeb> <876455cgf1.fsf@mid.deneb.enyo.de> <hoejjrs1fx.fsf@reger.suse.de>
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