mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Kernel+SystemServer: Don't hardcode coredump directory path
Instead, allow userspace to decide on the coredump directory path. By default, SystemServer sets it to the /tmp/coredump directory, but users can now change this by writing a new path to the sysfs node at /sys/kernel/variables/coredump_directory, and also to read this node to check where coredumps are currently generated at.
This commit is contained in:
parent
7dcf8f971b
commit
0bb7c8f4c4
10 changed files with 203 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/Library/NonnullLockRefPtr.h>
|
||||
#include <Kernel/Locking/SpinlockProtected.h>
|
||||
#include <Kernel/Memory/Region.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -18,6 +19,7 @@ namespace Kernel {
|
|||
class Coredump {
|
||||
public:
|
||||
static ErrorOr<NonnullOwnPtr<Coredump>> try_create(NonnullLockRefPtr<Process>, StringView output_path);
|
||||
static SpinlockProtected<OwnPtr<KString>>& directory_path();
|
||||
|
||||
~Coredump() = default;
|
||||
ErrorOr<void> write();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue