2023-09-02 22:42:00 +00:00
|
|
|
|
|
|
|
#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: ");
|
2023-09-03 18:55:51 +00:00
|
|
|
for (int i = 0; i < 100; i++) {
|
2023-09-02 22:42:00 +00:00
|
|
|
status[0] = OSSpawn("/bin/echo", &argv[0]);
|
2023-09-03 18:55:51 +00:00
|
|
|
printf("spawn: %lx\n", status[0]);
|
|
|
|
status[0] = OSWait(status[0]);
|
|
|
|
printf("wait: %lx\n", status[0]);
|
2023-09-02 22:42:00 +00:00
|
|
|
}
|
|
|
|
printf("Success!\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|