Commit 3e34d66
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>1 parent 928500e commit 3e34d66
1 file changed
+8
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 302 | + | |
307 | 303 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
321 | 307 | | |
322 | 308 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
| 309 | + | |
| 310 | + | |
327 | 311 | | |
328 | 312 | | |
329 | 313 | | |
330 | 314 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 315 | + | |
| 316 | + | |
335 | 317 | | |
336 | | - | |
337 | 318 | | |
338 | 319 | | |
339 | 320 | | |
340 | | - | |
341 | | - | |
342 | 321 | | |
343 | 322 | | |
344 | 323 | | |
| |||
0 commit comments