diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-28 10:18:28 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-28 10:18:28 +0000 |
commit | a2f86d8e08b530679bdcf8662c51e21c2e9ad46e (patch) | |
tree | 422026211baa5e515aa372943d16a20041a6c056 | |
parent | 44696296d5c2ffccef9d43d37d4f525bba7d9f5c (diff) | |
download | qemu-a2f86d8e08b530679bdcf8662c51e21c2e9ad46e.tar.gz qemu-a2f86d8e08b530679bdcf8662c51e21c2e9ad46e.tar.bz2 qemu-a2f86d8e08b530679bdcf8662c51e21c2e9ad46e.zip |
Use the host exit syscall for exiting (Lauro Ramos Venancio).
We can't call the libc _exit function because it calls the exit_group
host syscall. We must call directly the exit host syscall.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5561 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 44fbc7ca62..91deb80ba6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -152,6 +152,7 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ } +#define __NR_sys_exit __NR_exit #define __NR_sys_uname __NR_uname #define __NR_sys_faccessat __NR_faccessat #define __NR_sys_fchmodat __NR_fchmodat @@ -193,6 +194,7 @@ static int gettid(void) { return -ENOSYS; } #endif +_syscall1(int,sys_exit,int,status) _syscall1(int,sys_uname,struct new_utsname *,buf) #if defined(TARGET_NR_faccessat) && defined(__NR_faccessat) _syscall4(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode,int,flags) @@ -3395,7 +3397,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #endif gdb_exit(cpu_env, arg1); /* XXX: should free thread stack and CPU env */ - _exit(arg1); + sys_exit(arg1); ret = 0; /* avoid warning */ break; case TARGET_NR_read: |