mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
LibIPC: Make sure FDs survive when passed into a MessageBuffer
This commit is contained in:
parent
cc6db526a6
commit
de9b454f89
3 changed files with 34 additions and 4 deletions
|
@ -65,8 +65,8 @@ public:
|
|||
buffer.data.prepend(reinterpret_cast<const u8*>(&message_size), sizeof(message_size));
|
||||
|
||||
#ifdef __serenity__
|
||||
for (int fd : buffer.fds) {
|
||||
auto rc = sendfd(m_socket->fd(), fd);
|
||||
for (auto& fd : buffer.fds) {
|
||||
auto rc = sendfd(m_socket->fd(), fd->value());
|
||||
if (rc < 0) {
|
||||
perror("sendfd");
|
||||
shutdown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue