On Tuesday, November 8, 2016 at 5:08:24 PM UTC+3, helmsman helmsman wrote:
>
> I try to spawn subprocesses and communicate them using stdio pipes - my 
> code 
> <https://bitbucket.org/whalebot_helmsman/libuv-split/src/258eeb78b5d74a65a14eb83c7cc3edcd5231e7c7/src/spawn/spawn.c?at=default&fileviewer=file-view-default>
>  
> .
> It works great on linux. But on windows it sometimes hangs and outputs 
> some garbage on console
>
Let me put some clarifications. I want to build GNU parallel --pipe mode 
<https://www.gnu.org/software/parallel/man.html#EXAMPLE:-Processing-a-big-file-using-more-cores>
 
for windows. My steps

   - Spawn any  process 
   
<https://bitbucket.org/whalebot_helmsman/libuv-split/src/258eeb78b5d74a65a14eb83c7cc3edcd5231e7c7/src/spawn/spawn.c?at=default&fileviewer=file-view-default#spawn.c-72>,
 
   which knows nothing about my utility
   - Pass parent stdin 
   
<https://bitbucket.org/whalebot_helmsman/libuv-split/src/258eeb78b5d74a65a14eb83c7cc3edcd5231e7c7/src/spawn/spawn.c?at=default&fileviewer=file-view-default#spawn.c-54>
 
   to childrens' stdin using pipes line by line in round robin fashion
   - Put childrens' stdout to parent stdout

At this moment step 3 is not a question.

To test correctness of splitting I use cat util as a child. I assume what 
all stdin goes to stdout. I has some strange chars in stdout on Windows 
platform and sometimes  my util just hangs without any output. I has such 
problems only on Windows. On Linux all goes fine.

May be I incorrectly handle pipes? I just uv_pipe_init 
<https://bitbucket.org/whalebot_helmsman/libuv-split/src/258eeb78b5d74a65a14eb83c7cc3edcd5231e7c7/src/spawn/spawn.c?at=default&fileviewer=file-view-default#spawn.c-52>
 
them on parent side.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to