From b1f0925221d467bfa5f53e9b70de1332f77642a6 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Thu, 6 Jun 2024 14:04:36 +0200 Subject: [build] Cleanup --- build.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/build.c b/build.c index 1e6e61a..225a207 100755 --- a/build.c +++ b/build.c @@ -565,26 +565,23 @@ i32 main(i32 argc, c8 **argv) { #if defined(_WIN32) && !defined(__CYGWIN__) STARTUPINFO si = { .cb = sizeof(STARTUPINFO) }; PROCESS_INFORMATION pi = { 0 }; -#endif - if (OS == WINDOWS) { -#if defined(_WIN32) && !defined(__CYGWIN__) - CreateProcessA( - NULL, - fmt("\"." DLM "%s" DLM "test_interprocess\" reader", destination), - NULL, - NULL, - 0, - 0, - NULL, - NULL, - &si, - &pi - ); - Sleep(0); + CreateProcessA( + NULL, + fmt("\"." DLM "%s" DLM "test_interprocess\" reader", destination), + NULL, + NULL, + 0, + 0, + NULL, + NULL, + &si, + &pi + ); + Sleep(0); +#else + system(fmt("\"." DLM "%s" DLM "test_interprocess\" reader &", destination)); #endif - } else - system(fmt("\"." DLM "%s" DLM "test_interprocess\" reader &", destination)); code = system(fmt("\"." DLM "%s" DLM "test_interprocess\" writer", destination)); @@ -602,6 +599,10 @@ i32 main(i32 argc, c8 **argv) { CloseHandle(pi.hThread); #endif - printf("\nAll done.\n"); + if (status == 0) + printf("\nAll done - OK.\n"); + else + printf("\nAll done - FAILURE.\n"); + return status; } -- cgit v1.2.3