Usermode/libc - Fix strchr and strrchr behavior
[tpg/acess2.git] / Tools / NetTest_Runner / stack.c
index 1a224e8..07f8be7 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <fcntl.h>
 #include <spawn.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 #define MAX_ARGS       16
 
@@ -92,7 +94,7 @@ void sigchld_handler(int signum)
        fprintf(stderr, "FAILURE: Child exited (%i)\n", status);
 }
 
-int Stack_Start(const char *Subcommand)
+int Stack_Start(const char *RunName, const char *Subcommand)
 {
        Stack_AddArg(Subcommand);
        
@@ -107,8 +109,8 @@ int Stack_Start(const char *Subcommand)
        fcntl(giStack_InFD, F_SETFD, FD_CLOEXEC);
 
        FILE    *fp;
-       fp = fopen("stdout.txt", "a"); fprintf(fp, "--- Startup\n"); fclose(fp);
-       fp = fopen("stderr.txt", "a"); fprintf(fp, "--- Startup\n"); fclose(fp);
+       fp = fopen("stdout.txt", "a"); fprintf(fp, "--- TEST: %s\n", RunName); fclose(fp);
+       fp = fopen("stderr.txt", "a"); fprintf(fp, "--- TEST: %s\n", RunName); fclose(fp);
 
        posix_spawn_file_actions_t      fa;
        posix_spawn_file_actions_init(&fa);

UCC git Repository :: git.ucc.asn.au