Re: RFC socketpair

2011-05-03 Thread Paolo Bonzini
On 05/03/2011 03:07 PM, Bastien ROUCARIES wrote: It seems that we could use DuplicateHandle for the same process see http://support.microsoft.com/kb/150523/en-us Nice! Paolo

Re: RFC socketpair

2011-05-02 Thread Paolo Bonzini
On 05/01/2011 04:29 PM, Bastien ROUCARIES wrote: Did you test if dup2 work for socket ? According tohttp://www.suacommunity.com/dictionary/dup-entry.php andhttp://blog.csdn.net/linlu11/archive/2008/06/06/2518571.aspx it will need more work. dup2 indeed may not work for a socket on Windows.

Re: RFC socketpair

2011-05-01 Thread Bastien ROUCARIES
Yes, this is not very clear either. In the meantime you can play safe by relying only on the inheritance of STDIN_FILENO and STDOUT_FILENO. And unfortunatly socketpair need fd process inherance, so sad :( so sad? Just copy the 8 line of code relating to dup2() from

Re: RFC socketpair

2011-04-19 Thread Bruno Haible
Hello Bastien, I do not know how to replace the fork() on windows. It's replaced by doing a spawn to a separate program. Take for example the files modules/nonblocking-pipe-tests tests/test-nonblocking-pipe.sh tests/test-nonblocking-pipe-main.c tests/test-nonblocking-pipe-child.c that

Re: RFC socketpair

2011-04-19 Thread Bastien ROUCARIES
On Tue, Apr 19, 2011 at 2:08 PM, Bruno Haible br...@clisp.org wrote: Hello Bastien, I do not know how to replace the fork() on windows. It's replaced by doing a spawn to a separate program. Take for example the files  modules/nonblocking-pipe-tests  tests/test-nonblocking-pipe.sh  

Re: RFC socketpair

2011-04-19 Thread Bruno Haible
Bastien ROUCARIES wrote:  - You can pass command-line options and stdin, stdout to the child process;    file descriptors 2 cannot be passed to child processes on Windows, I think. Not sure about the last point see http://msdn.microsoft.com/en-us/library/ms683463(v=vs.85).aspx Yes, this

Re: RFC socketpair

2011-04-08 Thread Bastien ROUCARIES
Le jeudi 7 avril 2011 01:12:51, Bruno Haible a écrit : Hi Bastien, A request for comment for a socketpair for windows. Please comment. I think it is too early for us to comment, because it appears that you have not yet started to compile and test the code: int socketpair (int

RFC socketpair

2011-04-06 Thread Bastien ROUCARIES
Hi, A request for comment for a socketpair for windows. Please comment. In order to support AF_UNIX we will need to do the same thing that with dirfd. Bastien /* Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it

Re: RFC socketpair

2011-04-06 Thread Bruno Haible
Hi Bastien, A request for comment for a socketpair for windows. Please comment. I think it is too early for us to comment, because it appears that you have not yet started to compile and test the code: int socketpair (int domain, int type, int protocol, int sv[2]) { return