2018-10-23 05:12:50 -03:00
|
|
|
#include "process.h"
|
2018-10-25 07:06:00 -03:00
|
|
|
#include "errno.h"
|
2018-10-23 05:12:50 -03:00
|
|
|
#include <Kernel/Syscall.h>
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
2018-10-26 06:16:56 -03:00
|
|
|
int spawn(const char* path, const char** args)
|
2018-10-23 05:12:50 -03:00
|
|
|
{
|
2018-10-26 06:16:56 -03:00
|
|
|
int rc = Syscall::invoke(Syscall::Spawn, (dword)path, (dword)args);
|
2018-10-25 07:06:00 -03:00
|
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
2018-10-23 05:12:50 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|