(I haven't investigated exactly what). The problem is
that cp mmaps the source file, but it's never unmapped.
From: Lennart Augustsson <augustss@cs.chalmers.se>
SCCS-vsn: bin/cp/utils.c 8.2
-static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)utils.c 8.2 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
err("%s: %s", entp->fts_path, strerror(errno));
if (write(to_fd, p, fs->st_size) != fs->st_size)
err("%s: %s", to.p_path, strerror(errno));
err("%s: %s", entp->fts_path, strerror(errno));
if (write(to_fd, p, fs->st_size) != fs->st_size)
err("%s: %s", to.p_path, strerror(errno));
+ /* Some systems don't unmap on close(2). */
+ if (munmap(p, fs->st_size) < 0)
+ err("%s: %s", entp->fts_path, strerror(errno));