From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kulem-0006Uo-Tl for qemu-devel@nongnu.org; Tue, 28 Oct 2008 06:18:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kulej-0006Tf-6r for qemu-devel@nongnu.org; Tue, 28 Oct 2008 06:18:34 -0400 Received: from [199.232.76.173] (port=36912 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kulei-0006TU-Ka for qemu-devel@nongnu.org; Tue, 28 Oct 2008 06:18:32 -0400 Received: from savannah.gnu.org ([199.232.41.3]:53860 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kulei-0007ot-LQ for qemu-devel@nongnu.org; Tue, 28 Oct 2008 06:18:32 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kuleg-0000MS-VI for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:18:31 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kuleg-0000ML-2F for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:18:30 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Tue, 28 Oct 2008 10:18:30 +0000 Subject: [Qemu-devel] [5561] Use the host exit syscall for exiting (Lauro Ramos Venancio). Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5561 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5561 Author: balrog Date: 2008-10-28 10:18:28 +0000 (Tue, 28 Oct 2008) Log Message: ----------- 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. Modified Paths: -------------- trunk/linux-user/syscall.c Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-10-28 00:13:15 UTC (rev 5560) +++ trunk/linux-user/syscall.c 2008-10-28 10:18:28 UTC (rev 5561) @@ -152,6 +152,7 @@ } +#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 @@ 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 @@ #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: