Replies: 1 comment
-
Looking into this more, it seems that child process output to stdout and/or stderr are actually off by one. That is to say, if you: Send twice via stdout, only the first message will be received. If you send again, then the second message will be received, but not the third. In short, from the child if you send messages(represented as numbers here) to stdout(unbuffered): 1, 2, 3 -> Tauri will receive: 1, 2 I am uncertain if I am getting something wrong here, but if my child process completes a write (including any low-level flushes!), then I expect that write to be immediately received by Tauri via the spawned child's stdout's "data" event. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While using the new event-based command spawning of Command.spawn, it seems that stdout/stderr is either buffered or newline delimited. I'm using a separate spawned process for bi-directional JSON communication and it seems that receiving messages from the spawned process requires newline termination to actually be processed by Tauri. I have the same system working with an Electron-based implementation and it works flawlessly there.
I've tried what I can on the spawned process's side to flush the output (even though it is not buffered per default), but it is only ever received by Tauri if I add a newline. Is there some sort of solution to this problem that I am unaware of?
Beta Was this translation helpful? Give feedback.
All reactions