Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
parent
17ba8f721a
commit
4b25dcded2
|
|
@ -20,7 +20,9 @@ impl Syscall for SysExit {
|
|||
|
||||
fn handle(&self, args: &[usize], _frame: &mut TrapFrame) -> Result<usize, SystemError> {
|
||||
let exit_code = Self::exit_code(args);
|
||||
ProcessManager::group_exit((exit_code & 0xff) << 8);
|
||||
// 仿照 Linux sys_exit:只取低 8 位并左移 8 位,形成 wstatus 编码,
|
||||
// 然后只退出当前线程(不退出整个线程组)。
|
||||
ProcessManager::exit((exit_code & 0xff) << 8);
|
||||
}
|
||||
|
||||
fn entry_format(&self, args: &[usize]) -> Vec<FormattedSyscallParam> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue