This patch is to be applied on top of the series which adds the flag
parameters. It removes the size parameter from the new epoll_create
syscall and renames the syscall itself. The updated test program
follows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sys/syscall.h>
#ifndef __NR_epoll_create2
# ifdef __x86_64__
# define __NR_epoll_create2 291
# elif defined __i386__
# define __NR_epoll_create2 329
# else
# error "need __NR_epoll_create2"
# endif
#endif
#define EPOLL_CLOEXEC O_CLOEXEC
int
main (void)
{
int fd = syscall (__NR_epoll_create2, 0);
if (fd == -1)
{
puts ("epoll_create2(0) failed");
return 1;
}
int coe = fcntl (fd, F_GETFD);
if (coe == -1)
{
puts ("fcntl failed");
return 1;
}
if (coe & FD_CLOEXEC)
{
puts ("epoll_create2(0) set close-on-exec flag");
return 1;
}
close (fd);
fd = syscall (__NR_epoll_create2, EPOLL_CLOEXEC);
if (fd == -1)
{
puts ("epoll_create2(EPOLL_CLOEXEC) failed");
return 1;
}
coe = fcntl (fd, F_GETFD);
if (coe == -1)
{
puts ("fcntl failed");
return 1;
}
if ((coe & FD_CLOEXEC) == 0)
{
puts ("epoll_create2(EPOLL_CLOEXEC) set close-on-exec flag");
return 1;
}
close (fd);
puts ("OK");
return 0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/ia32/ia32entry.S | 2 +-
arch/x86/kernel/syscall_table_32.S | 2 +-
fs/eventpoll.c | 18 ++++++++++--------
include/asm-x86/unistd_32.h | 2 +-
include/asm-x86/unistd_64.h | 4 ++--
include/linux/eventpoll.h | 2 +-
include/linux/syscalls.h | 2 +-
7 files changed, 17 insertions(+), 15 deletions(-)
Signed-off-by: Ulrich Drepper <drepper@redhat...We're driving Uli crazy :) Thank you Matthew and Michael for noticing this before it went in. Acked-by: Davide Libenzi <davidel@xmailserver.org> - Davide --
| Artem Bityutskiy | [PATCH 00/22 take 3] UBI: Unsorted Block Images |
| Greg Kroah-Hartman | [PATCH 022/196] adb: Convert from class_device to device |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
| Ingo Molnar | Re: pthread_create() slow for many threads; also time to revisit 64b context switc... |
git: | |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Ludovic | `git-send-email' doesn't specify `Content-Type' |
| Miles Bader | multiple-commit cherry-pick? |
| JD Guzman | C# Git Implementation |
| Martin Schröder | Re: Real men don't attack straw men |
| Jacob Meuser | Re: esd + mpd |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Todd Pytel | IDE or SCSI virtual disks for VMWare image? |
| David Miller | Re: kernel oops when system under network stress |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Eric Dumazet | [PATCH 6/6] fs: Introduce kern_mount_special() to mount special vfs |
| Леонид Юрьев | [r8169] patch for RTL8102 (5 new MAC/PHY) |
