From 9af7ca9fe68f21218259354776b19685583250c4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 30 Jan 2012 19:22:13 +0100 Subject: Some platforms don't support pipe2. --- mempodipper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mempodipper.c b/mempodipper.c index 54dd26d..e17c069 100644 --- a/mempodipper.c +++ b/mempodipper.c @@ -102,7 +102,9 @@ unsigned long ptrace_address() { int fd[2]; printf("[+] Creating ptrace pipe.\n"); - pipe2(fd, O_NONBLOCK); + pipe(fd); + fcntl(fd[0], F_SETFL, O_NONBLOCK); + printf("[+] Forking ptrace child.\n"); int child = fork(); if (child) { -- cgit v1.2.3-59-g8ed1b