From 0eaad9dd7b568bdcf9ff2a72d3a2fe91c06a4542 Mon Sep 17 00:00:00 2001 From: tomberek Date: Tue, 2 Mar 2021 00:13:22 -0500 Subject: [PATCH] Fix APE error if unable to modify self See PR #96 and issue #85 --- ape/ape.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ape/ape.S b/ape/ape.S index 126b2df95..f7538a23a 100644 --- a/ape/ape.S +++ b/ape/ape.S @@ -573,6 +573,8 @@ apesh: .ascii "'\n#'\"\n" # sixth edition shebang .shstub ape_elf_shstrndx,2 # 3e: e_shstrndx .ascii "' >&7\n" .ascii "exec 7<&-\n" + .ascii "else\n" + .ascii "exit 1\n" .ascii "fi\n" .ascii "exec \"$0\" \"$@\"\n" # etxtbsy tail recursion .ascii "R=$?\n" # architecture optimistic