2 When you view a file with the more command and run a shell, the file descriptor
3 for reading the file is leaked to that process.
5 To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd"
6 and you'll see the leaked fd.
8 From: Steve Grubb <sgrubb@redhat.com>
10 --- util-linux-2.13-pre7/text-utils/more.c.cloexec 2006-12-14 14:05:31.000000000 +0100
11 +++ util-linux-2.13-pre7/text-utils/more.c 2006-12-14 14:04:57.000000000 +0100
16 + fcntl(fileno(f), F_SETFD, FD_CLOEXEC );
18 *clearfirst = (c == '\f');