summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibIPC
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-03 16:51:42 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 21:14:40 +0200
commit8a6db55e79ee484bc071fcb52ca30da069231f77 (patch)
treeed8826549c5247ad4c103f93079168ada7403a9d /Userland/Libraries/LibIPC
parent34cf5cf07f9dd8ef60d28f1a5410a689fff2ef9c (diff)
downloadserenity-8a6db55e79ee484bc071fcb52ca30da069231f77.zip
Userland: Add try_* IPC handlers
This enables calling auto-generated IPC methods in a way that doesn't crash the client if the peer disconnects.
Diffstat (limited to 'Userland/Libraries/LibIPC')
-rw-r--r--Userland/Libraries/LibIPC/Message.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibIPC/Message.h b/Userland/Libraries/LibIPC/Message.h
index 0cb74bdde1..48b8cec912 100644
--- a/Userland/Libraries/LibIPC/Message.h
+++ b/Userland/Libraries/LibIPC/Message.h
@@ -37,6 +37,10 @@ struct MessageBuffer {
Vector<RefPtr<AutoCloseFileDescriptor>> fds;
};
+enum class ErrorCode : u32 {
+ PeerDisconnected
+};
+
class Message {
public:
virtual ~Message();