test_must_fail: report number of unexpected signal
[gitweb.git] / run-command.c
index 13fa452e8c3d5a5e20e24a969d53ce7ade4019bf..3add1d66ac344feab2ca39ee6fff663628c5fe32 100644 (file)
@@ -633,6 +633,11 @@ int in_async(void)
        return !pthread_equal(main_thread, pthread_self());
 }
 
+void NORETURN async_exit(int code)
+{
+       pthread_exit((void *)(intptr_t)code);
+}
+
 #else
 
 static struct {
@@ -678,6 +683,11 @@ int in_async(void)
        return process_is_async;
 }
 
+void NORETURN async_exit(int code)
+{
+       exit(code);
+}
+
 #endif
 
 int start_async(struct async *async)