summaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-07-26 04:32:13 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-27 02:53:39 +0200
commit3c333937ee3be114b181c4861188cfe8f6a59697 (patch)
treefda3bb122bb4c9c180ef41e5d142ac315dc7a576 /fs/file_table.c
parent[PATCH] don't pass nameidata to __ncp_lookup_validate() (diff)
downloadlinux-3c333937ee3be114b181c4861188cfe8f6a59697.tar.xz
linux-3c333937ee3be114b181c4861188cfe8f6a59697.zip
[PATCH] dup3 fix
Al Viro notice one cornercase that the new dup3() code. The dup2() function, as a special case, handles dup-ing to the same file descriptor. In this case the current dup3() code does nothing at all. I.e., it ingnores the flags parameter. This shouldn't happen, the close-on-exec flag should be set if requested. In case the O_CLOEXEC bit in the flags parameter is not set the dup3() function should behave in this respect identical to dup2(). This means dup3(fd, fd, 0) should not actively reset the c-o-e flag. The patch below implements this minor change. [AV: credits to Artur Grabowski for bringing that up as potential subtle point in dup2() behaviour] Signed-off-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/file_table.c')
0 files changed, 0 insertions, 0 deletions