2020-07-31 00:38:15 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-31 00:38:15 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <Kernel/KSyms.h>
|
|
|
|
#include <Kernel/Process.h>
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
void Process::sys$exit(int status)
|
|
|
|
{
|
2021-03-11 16:24:08 +03:00
|
|
|
{
|
|
|
|
ProtectedDataMutationScope scope { *this };
|
|
|
|
m_termination_status = status;
|
|
|
|
m_termination_signal = 0;
|
|
|
|
}
|
2020-07-31 00:38:15 +03:00
|
|
|
die();
|
|
|
|
Thread::current()->die_if_needed();
|
2021-02-23 22:42:32 +03:00
|
|
|
VERIFY_NOT_REACHED();
|
2020-07-31 00:38:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|