Permalink
Browse files

Ensured that __sys_exit() calls exit_group(2) instead of exit(2).

  • Loading branch information...
bendiken committed Nov 23, 2014
1 parent 1fb46d0 commit 756ad0b71a0c1e3631839c45511a9b5e5125d31b
Showing with 4 additions and 4 deletions.
  1. +2 −2 sys/posix/linux/x86/__sys_exit.S
  2. +2 −2 sys/posix/linux/x86_64/__sys_exit.S
@@ -1,13 +1,13 @@
/* This is free and unencumbered software released into the public domain. */
#define SYS_exit 1
#define SYS_exit_group 252
.section .text
.global __sys_exit
__sys_exit:
/* 4(%esp) = status */
movl 4(%esp), %ebx
movl $SYS_exit, %eax
movl $SYS_exit_group, %eax
int $0x80
hlt
@@ -1,12 +1,12 @@
/* This is free and unencumbered software released into the public domain. */
#define SYS_exit 60
#define SYS_exit_group 231
.section .text
.global __sys_exit
__sys_exit:
/* %rdi = status */
movq $SYS_exit, %rax
movq $SYS_exit_group, %rax
syscall
hlt

0 comments on commit 756ad0b

Please sign in to comment.