diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 5b39dc39a74f..f7faa451c311 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -38,8 +38,7 @@ ; #ifdef's, etc. may be included, and are copied to the output files. 0 AUE_NULL UNIMPL setup -1 AUE_EXIT NOPROTO { void sys_exit(int rval); } exit \ - sys_exit_args void +1 AUE_EXIT STD { void linux_exit(int rval); } 2 AUE_FORK STD { int linux_fork(void); } 3 AUE_NULL NOPROTO { int read(int fd, char *buf, \ u_int nbyte); } diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 316cf2a61ebb..c951c8f6287d 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef COMPAT_LINUX32 #include @@ -297,3 +298,16 @@ linux_clone(struct thread *td, struct linux_clone_args *args) return (0); } + +int +linux_exit(struct thread *td, struct linux_exit_args *args) +{ + +#ifdef DEBUG + if (ldebug(exit)) + printf(ARGS(exit, "%d"), args->rval); +#endif + + exit1(td, W_EXITCODE(args->rval, 0)); + /* NOTREACHED */ +} diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 5b4f3a6340fe..62d53674faeb 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -37,8 +37,7 @@ ; #ifdef's, etc. may be included, and are copied to the output files. 0 AUE_NULL UNIMPL setup -1 AUE_EXIT NOPROTO { void sys_exit(int rval); } exit \ - sys_exit_args void +1 AUE_EXIT STD { void linux_exit(int rval); } 2 AUE_FORK STD { int linux_fork(void); } 3 AUE_NULL NOPROTO { int read(int fd, char *buf, \ u_int nbyte); }