SECCOMP exit()
authorTomas Mudrunka <tomas@mudrunka.cz>
Mon, 10 Feb 2014 22:10:01 +0000 (23:10 +0100)
committerTomas Mudrunka <tomas@mudrunka.cz>
Mon, 10 Feb 2014 22:10:01 +0000 (23:10 +0100)
c/seccomp.c

index 527daea30c9dac9c946b5810e96b8c8bae232b43..c939c04052f193ccb7dee987d0dc61100fdf8cd2 100644 (file)
  *
  */
 
+#include <stdlib.h>
 #include <string.h>
 #include <sys/prctl.h>
 #include <linux/seccomp.h>
 #include <sys/syscall.h>
 
 #define DISPLAY(msg) (syscall( SYS_write, 2, msg, strlen(msg) ))
+#define exit(status) { syscall( SYS_exit, status ); abort(); }
 
 int main() {
        system("echo before");
@@ -25,4 +27,5 @@ int main() {
        //fflush(NULL);
 
        system("echo after");
+       exit(0);
 }
This page took 0.14958 seconds and 4 git commands to generate.