bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC socketpair


From: Bruno Haible
Subject: Re: RFC socketpair
Date: Tue, 19 Apr 2011 14:08:09 +0200
User-agent: KMail/1.9.9

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 were committed in gnulib two days ago. The essential points are:
  - Use a separate program for the child process(es).
  - Use posix_spawnp on Unix, spawnvpe on native Windows to spawn the child
    process. (Our posix_spawnp does not yet work on mingw.)
  - 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.

Bruno
-- 
In memoriam Charles Delestraint 
<http://en.wikipedia.org/wiki/Charles_Delestraint>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]