vite-plugin-electron
vite-plugin-electron copied to clipboard
Avoid file descriptor 3 for IPC on Linux to prevent Chromium collision
Chromium/Electron on Linux assumes file descriptor 3 is its lowest reserved control pipe in several places (e.g., Crashpad handler plumbing) and, when used, DevTools’ --remote-debugging-pipe also binds file descriptors 3/4. If FD 3 is already a Node IPC pipe, the Chromium side can’t set up what it expects, and DevTools misbehaves. By inserting an ignore entry at index 3, we keep FD free for Chromium and put Node’s IPC on FD 4. The IPC-based feature from PR #260 continues to work normally via child.send/process.on('message').
Fixes #264 Closes #280
CC @caoxiemeihao