-#include <stdio.h>
+#include <rstdio.h>
#include <parlib.h>
int main(int argc, char** argv)
{
+ #define FILENAME "/bin/hello"
#if 0
/* try some bad combos */
int pid = sys_proc_create("garbagexxx");
}
#endif
printf("U: attempting to create and run hello\n");
- child_pid[0] = sys_proc_create("roslib_hello");
- sys_proc_run(child_pid[0]);
- printf("U: attempting to create and run mhello\n");
- child_pid[1] = sys_proc_create("roslib_mhello");
- sys_proc_run(child_pid[1]);
+ child_pid[0] = sys_proc_create(FILENAME, strlen(FILENAME), 0, 0);
+ if (child_pid[0] <= 0)
+ perror("");
+ else
+ if (sys_proc_run(child_pid[0]) < 0)
+ perror("");
+ printf("U: attempting to create and run another hello\n");
+ child_pid[1] = sys_proc_create(FILENAME, strlen(FILENAME), 0, 0);
+ if (child_pid[1] <= 0)
+ perror("");
+ else
+ if (sys_proc_run(child_pid[1]) < 0)
+ perror("");
return 0;
}