2011-08-27 23:26:11 +02:00
|
|
|
#include <stdio.h>
|
2011-11-26 11:00:45 +01:00
|
|
|
#include <errno.h>
|
|
|
|
#include <error.h>
|
2011-09-21 20:52:29 +02:00
|
|
|
#include <libmaxsi/platform.h>
|
2011-08-27 23:26:11 +02:00
|
|
|
#include <libmaxsi/process.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
// Reset the terminal's color and the rest of it.
|
|
|
|
printf("Please enter the name of one of the following programs:\n");
|
|
|
|
|
|
|
|
const char* programname = "ls";
|
2011-11-21 00:30:24 +01:00
|
|
|
const char* newargv[] = { programname, "/bin" };
|
2011-08-27 23:26:11 +02:00
|
|
|
|
2011-11-21 00:30:24 +01:00
|
|
|
Maxsi::Process::Execute(programname, 2, newargv);
|
2011-08-27 23:26:11 +02:00
|
|
|
|
2011-11-26 11:00:45 +01:00
|
|
|
error(1, errno, "%s", programname);
|
|
|
|
|
2011-08-27 23:26:11 +02:00
|
|
|
return 1;
|
|
|
|
}
|