Explorar o código

* Fix startup error on OpenBSD 4.7 due to failed ptrace()

Estella %!s(int64=16) %!d(string=hai) anos
pai
achega
1ce03bbd28
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/shell.c

+ 1 - 1
src/shell.c

@@ -312,7 +312,7 @@ void check_trace(int start)
       case 0:		//child
         i = ptrace(PT_ATTACH, parent, 0, 0);
         /* EPERM is given on fbsd when security.bsd.unprivileged_proc_debug=0 */
-        if (i == -1 && errno != EPERM) {
+        if (i == -1 && errno != EPERM && errno != EINVAL) {
           if (start) {
             kill(parent, SIGKILL);
             exit(1);