#include #include #include #include // Castor Only #include 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"); printf("Spawn parallel test wait any: "); for (int i = 0; i < 10; i++) { status[i] = OSSpawn("/bin/echo", &argv[0]); printf("spawn: %lx\n", status[i]); } for (int i = 0; i < 10; i++) { status[i] = OSWait(0); printf("wait: %lx\n", status[i]); } printf("Success!\n"); return 0; }