ladybird/Libraries/LibCore
Aliaksandr Kalenik 4ea4d63008 Everywhere: Replace Unix socket IPC transport with Mach ports on macOS
On macOS, use Mach port messaging instead of Unix domain sockets for
all IPC transport. This makes the transport capable of carrying Mach
port rights as message attachments, which is a prerequisite for sending
IOSurface handles over the main IPC channel (currently sent via a
separate out-of-band path). It also avoids the need for the FD
acknowledgement protocol that TransportSocket requires, since Mach port
right transfers are atomic in the kernel.

Three connection establishment patterns:

- Spawned helper processes (WebContent, RequestServer, etc.) use the
  existing MachPortServer: the child sends its task port with a reply
  port, and the parent responds with a pre-created port pair.

- Socket-bootstrapped connections (WebDriver, BrowserProcess) exchange
  Mach port names over the socket, then drop the socket.

- Pre-created pairs for IPC tests and in-message transport transfer.

Attachment on macOS now wraps a MachPort instead of a file descriptor,
converting between the two via fileport_makeport()/fileport_makefd().

The LibIPC socket transport tests are disabled on macOS since they are
socket-specific.
2026-03-23 18:50:48 +01:00
..
Platform Everywhere: Replace Unix socket IPC transport with Mach ports on macOS 2026-03-23 18:50:48 +01:00
AddressInfoVector.cpp LibCore: Move AddressInfoVector to its own file 2025-12-01 06:34:32 -05:00
AddressInfoVector.h LibCore: Move AddressInfoVector to its own file 2025-12-01 06:34:32 -05:00
AnonymousBuffer.cpp LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
AnonymousBuffer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
AnonymousBufferWindows.cpp LibCore: Consistently treat file descriptors as handles on Windows 2025-02-05 19:27:47 -07:00
ArgsParser.cpp LibCore+LibJS+LibWasm: Always use a real format string 2025-04-08 20:00:18 -04:00
ArgsParser.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
CMakeLists.txt LibCore+LibWeb: Add ScopedAutoreleasePool and use it on macOS 2026-03-15 11:42:43 +01:00
ConfigFile.cpp LibCore: Remove unused header in ConfigFile 2026-02-21 19:27:35 +01:00
ConfigFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Directory.cpp AK+LibCore: Avoid double-negation of syscall error values 2025-05-10 21:19:46 -04:00
Directory.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
DirectoryEntry.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirectoryEntry.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirIterator.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirIterator.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ElapsedTimer.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ElapsedTimer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Environment.cpp Meta+LibCore: Disable --no-undefined on FreeBSD and remove LibCore hack 2025-10-22 13:54:54 +02:00
Environment.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Event.h LibCore: Don't require heap-allocated event to hold deferred invocation 2025-12-03 13:26:27 +01:00
EventLoop.cpp LibThreading: Fix data race in RWLock::unlock() 2026-03-07 13:09:50 +01:00
EventLoop.h LibCore: Remove the pending jobs functionality from ThreadEventQueue 2026-03-02 17:06:39 -06:00
EventLoopImplementation.cpp LibCore: Remove unused header in EventLoopImplementation 2026-02-21 19:27:35 +01:00
EventLoopImplementation.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
EventLoopImplementationUnix.cpp LibCore+LibWeb: Add ScopedAutoreleasePool and use it on macOS 2026-03-15 11:42:43 +01:00
EventLoopImplementationUnix.h LibCore: Avoid UAF on the array of wake pipes when exit()ing 2026-03-02 17:06:39 -06:00
EventLoopImplementationWindows.cpp LibCore: Prevent UAF on event loop wake handles on Windows 2026-03-02 17:06:39 -06:00
EventLoopImplementationWindows.h LibCore: Prevent UAF on event loop wake handles on Windows 2026-03-02 17:06:39 -06:00
EventReceiver.cpp LibCore: Remove unused header in EventReceiver 2026-02-21 19:27:35 +01:00
EventReceiver.h LibCore: Stop atomically ref-counting EventReceiver 2026-03-02 17:06:39 -06:00
EventSwift.h LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
File.cpp LibCore+RequestServer: Return size_t from system read/write functions 2025-12-01 16:29:48 +01:00
File.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
FileWatcher.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
FileWatcherInotify.cpp LibCore: Implement FileWatcher for any systems with inotify 2026-01-16 10:59:50 -07:00
FileWatcherUnimplemented.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Forward.h LibCore: Remove forward declaration of non-existent type 2026-02-23 12:15:23 +01:00
IOSurface.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
IOSurface.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
LocalServer.cpp LibCore: Remove unused header in LocalServer 2026-02-21 19:27:35 +01:00
LocalServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
LocalServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
MachPort.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
MachPort.h Everywhere: Replace Unix socket IPC transport with Mach ports on macOS 2026-03-23 18:50:48 +01:00
MappedFile.cpp LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
MappedFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
MimeData.cpp LibCore: Remove unused header in MimeData 2026-02-21 19:27:35 +01:00
MimeData.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
NetworkResponse.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Notifier.cpp LibCore: Remove unused header in EventLoop 2026-02-21 19:27:35 +01:00
Notifier.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Process.cpp LibCore: Mark Process::wait_for_termination as const 2025-11-07 11:27:51 +01:00
Process.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ProcessWindows.cpp LibCore: Handle long paths in ProcessWindows 2026-02-02 10:35:11 +01:00
Promise.h LibCore: Remove unused header in EventReceiver 2026-02-21 19:27:35 +01:00
Proxy.h LibCore: Make ProxyData::port a u16 2026-01-22 17:38:15 +01:00
ReportTime.cpp LibCore: Introduce REPORT_TIME() for per call timing information 2025-11-11 11:47:59 +01:00
ReportTime.h LibCore: Introduce REPORT_TIME() for per call timing information 2025-11-11 11:47:59 +01:00
Resource.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Resource.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ResourceImplementation.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementation.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ResourceImplementationFile.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementationFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SharedCircularQueue.h LibCore: Atomically ref-count SharedSingleProducerCircularQueue guts 2025-05-24 06:52:25 -06:00
SharedVersion.cpp LibCore: Add helpers to share arbitrary versions between processes 2026-02-05 07:28:07 -05:00
SharedVersion.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Socket.cpp LibCore+RequestServer: Return size_t from system read/write functions 2025-12-01 16:29:48 +01:00
Socket.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SocketAddress.cpp LibCore: Define SocketAddress out-of-line to remove SocketAddressWindows 2025-12-01 06:34:32 -05:00
SocketAddress.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SocketpairWindows.cpp LibCore/LibIPC/Meta: Stop using deprecated Winsock functions 2026-02-02 10:35:11 +01:00
SocketWindows.cpp LibCore: Define SocketAddress out-of-line to remove SocketAddressWindows 2025-12-01 06:34:32 -05:00
StandardPaths.cpp LibCore: Remove unused header in StandardPaths 2026-02-21 19:27:35 +01:00
StandardPaths.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
System.cpp LibCore: Remove unused header in System 2026-02-21 19:27:35 +01:00
System.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SystemServerTakeover.cpp LibCore: Port SystemServerTakeover.cpp to Windows 2025-02-06 15:25:14 -07:00
SystemServerTakeover.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SystemWindows.cpp LibCore/LibIPC/Meta: Stop using deprecated Winsock functions 2026-02-02 10:35:11 +01:00
TCPServer.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TCPServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
ThreadedPromise.h LibCore: Fix ThreadedPromise issues found with ThreadSanitizer 2025-09-24 21:05:54 -05:00
ThreadEventQueue.cpp LibCore: Remove the pending jobs functionality from ThreadEventQueue 2026-03-02 17:06:39 -06:00
ThreadEventQueue.h LibCore: Remove the pending jobs functionality from ThreadEventQueue 2026-03-02 17:06:39 -06:00
Timer.cpp LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
Timer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TimeZoneWatcher.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TimeZoneWatcherMacOS.mm Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TimeZoneWatcherUnimplemented.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TimeZoneWatcherUnix.cpp LibCore: Remove unused header in TimeZoneWatcherUnix 2026-02-21 19:27:35 +01:00
TimeZoneWatcherWindows.cpp LibCore+LibWebView+UI/Qt: Support TimeZoneWatcher on Windows 2025-10-05 15:46:15 +02:00
UDPServer.cpp LibCore: Accept ReadonlyBytes/Bytes in System::send/recv 2025-12-01 08:55:33 -05:00
UDPServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
UDPServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
Version.cpp LibCore: Remove LADYBIRD_GIT_VERSION environment variable usage 2025-05-15 14:02:48 +02:00
Version.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00