-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPC direct writing fails on Windows #17405
Comments
I think this is the same issue as #16491? |
@addaleax, that issue talks about sending junk, but I'm sending a json
and it works on linux. Is there any difference in the expected text on Windows? Is it In any case, if there is no difference then this is a different problem, |
The documentation needs an update. I've added labels. PR welcome.
Quite. Libuv uses a binary protocol on Windows.
No, and it shouldn't be, it's internal. |
@bnoordhuis: is there any reason for a binary protocol? (Practical But back to the problem, if the intention is to not rely on even the (At least I assume that if it's internal to the library, then it does |
Simplicity and efficiency. Libuv doesn't want to be in the business of parsing a complex protocol like JSON.
It wouldn't surprise me if that line predates the Windows port. Perhaps add an "on UNIX" qualifier. |
@bnoordhuis But at least the simplicity+efficiency reason sounds like |
I’ve done some investigating regarding #16491. I even made a fix for that issue. The problem is, while it fixed using But also, it turns out it does not work on Linux too. If you try to use
So, I think we should remove that line for all platforms. @elibarzilay, you can try using normal named pipe for communication. Or, you can try using libuv (maybe https://github.com/saghul/pyuv?) to send your messages. |
IPC messages are more complicated than a simple pipe passing JSON objects separated by new line. This removes inaccurate notes about implementation from the documentation. Fixes: nodejs#16491 Fixes: nodejs#17405
@bzoz -- thanks for the doc fix. Re my communication problem, I plan on just using an additional FD, so there's no need for a named pipe... |
IPC messages are more complicated than a simple pipe passing JSON objects separated by new line. This removes inaccurate notes about implementation from the documentation. PR-URL: #17460 Fixes: #16491 Fixes: #17405 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
IPC messages are more complicated than a simple pipe passing JSON objects separated by new line. This removes inaccurate notes about implementation from the documentation. PR-URL: #17460 Fixes: #16491 Fixes: #17405 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
IPC messages are more complicated than a simple pipe passing JSON objects separated by new line. This removes inaccurate notes about implementation from the documentation. PR-URL: #17460 Fixes: #16491 Fixes: #17405 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
IPC messages are more complicated than a simple pipe passing JSON objects separated by new line. This removes inaccurate notes about implementation from the documentation. PR-URL: #17460 Fixes: #16491 Fixes: #17405 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Using a fie descriptor directly to send IPC messages is broken on
Windows:
x.js
:y.js
:On Linux, this works fine, but on Windows I'm getting:
If I change
y.js
to useprocess.send
it works fine again. (There'sno reason to avoid it, but we want to get IPC messages from a python
subprocess, which fails in the same way.)
The text was updated successfully, but these errors were encountered: