Код: Выделить всё
#include
#include
#include
#include
using namespace std;
int main()
{
int pp[2];
pipe(pp);
pid_t pid = fork();
if(pid == 0)
{
//target
close(pp[0]);
scmp_filter_ctx ctx = seccomp_init(SCMP_ACT_ALLOW);
seccomp_rule_add(ctx, SCMP_ACT_NOTIFY, SCMP_SYS(getpid), 0);
seccomp_load(ctx);
int fd = seccomp_notify_fd(ctx);
write(pp[1], &fd, sizeof(fd));
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78242085/seccomp-unotify-cant-catch-syscall-more-than-once[/url]
Мобильная версия