From 946aadad12b4b095dce1ba67d824bf7750101134 Mon Sep 17 00:00:00 2001 From: faissaloo Date: Tue, 21 Jun 2016 20:50:39 +0100 Subject: Relied on the value of r8 accidentally, oops --- sh | Bin 3864 -> 3872 bytes sh.asm | 5 ++++- sh.o | Bin 4176 -> 4176 bytes 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sh b/sh index 33ac2fc..7644a0b 100755 Binary files a/sh and b/sh differ diff --git a/sh.asm b/sh.asm index 6b19535..e50d941 100644 --- a/sh.asm +++ b/sh.asm @@ -13,6 +13,9 @@ section .data ;Indicates that a file can be accessed in the way specified F_OK equ 0x0 + + ;option for waitid + P_PGID equ 2 ;Syscall constants sys_read equ 0x00 sys_write equ 0x01 @@ -100,7 +103,7 @@ _wait_for_proc: mov rax, sys_waitid mov rdi, 0 xor rdx, rdx - xor r10, r8 + mov r10, P_PGID xor r8, r8 syscall diff --git a/sh.o b/sh.o index c6b7ddf..0638b78 100644 Binary files a/sh.o and b/sh.o differ -- cgit v1.2.3