author | Johannes Sixt <j6t@kdbg.org> | |
Fri, 15 Jan 2010 20:12:17 +0000 (21:12 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 17 Jan 2010 00:43:52 +0000 (16:43 -0800) | ||
commit | 3e34d6657733430164ef67ab2f000fa3d10d51b5 | |
tree | 7ec4b39a6ae1ca029de3e3af69008f8c2bc05b56 | tree | snapshot |
parent | 928500e00e0a73a11f5b2296d9baa82dafa7a1a8 | commit | diff |
Windows: simplify the pipe(2) implementation
Our implementation of pipe() must create non-inheritable handles for the
reason that when a child process is started, there is no opportunity to
close the unneeded pipe ends in the child (on POSIX this is done between
fork() and exec()).
Previously, we used the _pipe() function provided by Microsoft's C runtime
(which creates inheritable handles) and then turned the handles into
non-inheritable handles using the DuplicateHandle() API.
Simplify the procedure by using the CreatePipe() API, which can create
non-inheritable handles right from the beginning.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Our implementation of pipe() must create non-inheritable handles for the
reason that when a child process is started, there is no opportunity to
close the unneeded pipe ends in the child (on POSIX this is done between
fork() and exec()).
Previously, we used the _pipe() function provided by Microsoft's C runtime
(which creates inheritable handles) and then turned the handles into
non-inheritable handles using the DuplicateHandle() API.
Simplify the procedure by using the CreatePipe() API, which can create
non-inheritable handles right from the beginning.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c | diff | blob | history |