aboutgitcodelistschat:MatrixIRC
path: root/eater/eater.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-06 11:56:21 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-06 11:56:21 +0200
commite5a1983e4384a44e45486fb9a48bdba375a529b6 (patch)
tree6e84d9e43245b2d2c6aa2a6312b6281d744a7d24 /eater/eater.c
parent9c371d77e843163261d28e374f4ea7dab2e3f64d (diff)
downloadseitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.gz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.bz2
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.lz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.xz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.zst
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.zip
cooker: Draft quality: mknod/mknodat, sets of values with "in"
While at it: - directly assign 'fd' in eater from install_filter() - turn op_cmp into a description-style thing Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'eater/eater.c')
-rw-r--r--eater/eater.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eater/eater.c b/eater/eater.c
index 567bffa..af1df5f 100644
--- a/eater/eater.c
+++ b/eater/eater.c
@@ -98,18 +98,19 @@ int main(int argc, char **argv)
n = read(fd, filter, sizeof(filter));
close(fd);
- install_filter(filter, (unsigned short)(n / sizeof(filter[0])));
+ fd = install_filter(filter, (unsigned short)(n / sizeof(filter[0])));
+
/*
* close-on-exec flag is set for the file descriptor by seccomp.
* We want to preserve the fd on the exec in this way we are able
* to easly find the notifier fd if seitan restarts.
*/
- fd = find_fd_seccomp_notifier("/proc/self/fd");
flags = fcntl(fd, F_GETFD);
if (fcntl(fd, F_SETFD, flags & !FD_CLOEXEC) < 0) {
perror("fcntl");
exit(EXIT_FAILURE);
}
+
act.sa_handler = signal_handler;
sigaction(SIGCONT, &act, NULL);
pause();