Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/cloudabi/cloudabi_proc.c
Show All 21 Lines | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/imgact.h> | |||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/syscallsubr.h> | |||||
#include <compat/cloudabi/cloudabi_proto.h> | #include <compat/cloudabi/cloudabi_proto.h> | ||||
int | int | ||||
cloudabi_sys_proc_exec(struct thread *td, | cloudabi_sys_proc_exec(struct thread *td, | ||||
struct cloudabi_sys_proc_exec_args *uap) | struct cloudabi_sys_proc_exec_args *uap) | ||||
{ | { | ||||
struct image_args args; | |||||
int error; | |||||
/* Not implemented. */ | error = exec_copyin_data_fds(td, &args, uap->data, uap->datalen, | ||||
return (ENOSYS); | uap->fds, uap->fdslen); | ||||
if (error == 0) { | |||||
args.fd = uap->fd; | |||||
error = kern_execve(td, &args, NULL); | |||||
} | |||||
return (error); | |||||
} | } | ||||
int | int | ||||
cloudabi_sys_proc_exit(struct thread *td, | cloudabi_sys_proc_exit(struct thread *td, | ||||
struct cloudabi_sys_proc_exit_args *uap) | struct cloudabi_sys_proc_exit_args *uap) | ||||
{ | { | ||||
exit1(td, W_EXITCODE(uap->rval, 0)); | exit1(td, W_EXITCODE(uap->rval, 0)); | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |