metal-cos/tests/spawnsingletest.c
2023-10-02 18:16:18 -04:00

27 lines
440 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Castor Only
#include <syscall.h>
int
main(int argc, const char *argv[])
{
int status[10];
printf("Spawn test: ");
for (int i = 0; i < 100; i++) {
status[0] = OSSpawn("/bin/echo", &argv[0]);
printf("spawn: %lx\n", status[0]);
status[0] = OSWait(status[0]);
printf("wait: %lx\n", status[0]);
}
printf("Success!\n");
return 0;
}