mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 06:55:07 +00:00
Kernel: Abort core dump generation if any substep fails
And make an effort to propagate errors out from the inner parts. This fixes an issue where the kernel would infinitely loop in coredump generation if the TmpFS filled up.
This commit is contained in:
parent
531c3fe72e
commit
2dfe5751f3
4 changed files with 52 additions and 24 deletions
|
@ -590,7 +590,9 @@ void Process::finalize()
|
|||
if (is_profiling()) {
|
||||
auto coredump = CoreDump::create(*this, String::formatted("/tmp/profiler_coredumps/{}", pid().value()));
|
||||
if (coredump) {
|
||||
coredump->write();
|
||||
auto result = coredump->write();
|
||||
if (result.is_error())
|
||||
dbgln("Core dump generation failed: {}", result.error());
|
||||
} else {
|
||||
dbgln("Could not create coredump");
|
||||
}
|
||||
|
@ -601,7 +603,9 @@ void Process::finalize()
|
|||
auto coredump_path = String::formatted("/tmp/coredump/{}_{}_{}", name(), m_pid.value(), RTC::now());
|
||||
auto coredump = CoreDump::create(*this, coredump_path);
|
||||
if (coredump) {
|
||||
coredump->write();
|
||||
auto result = coredump->write();
|
||||
if (result.is_error())
|
||||
dbgln("Core dump generation failed: {}", result.error());
|
||||
} else {
|
||||
dbgln("Could not create coredump");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue