]> git.karo-electronics.de Git - linux-beck.git/blobdiff - tools/testing/selftests/x86/entry_from_vm86.c
selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
[linux-beck.git] / tools / testing / selftests / x86 / entry_from_vm86.c
index 421c607a8856887d0f9f6048c2ab26bd9367efdd..d075ea0e5ca1ac0a42ce0d48e25b30a1a059de48 100644 (file)
@@ -230,5 +230,9 @@ int main(void)
        }
        clearhandler(SIGSEGV);
 
+       /* Make sure nothing explodes if we fork. */
+       if (fork() > 0)
+               return 0;
+
        return (nerrs == 0 ? 0 : 1);
 }