MCPcopy Index your code
hub / github.com/git/git / pipe

Function pipe

compat/mingw.c:1484–1506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1482}
1483
1484int pipe(int filedes[2])
1485{
1486 HANDLE h[2];
1487
1488 /* this creates non-inheritable handles */
1489 if (!CreatePipe(&h[0], &h[1], NULL, 8192)) {
1490 errno = err_win_to_posix(GetLastError());
1491 return -1;
1492 }
1493 filedes[0] = _open_osfhandle(HCAST(int, h[0]), O_NOINHERIT);
1494 if (filedes[0] < 0) {
1495 CloseHandle(h[0]);
1496 CloseHandle(h[1]);
1497 return -1;
1498 }
1499 filedes[1] = _open_osfhandle(HCAST(int, h[1]), O_NOINHERIT);
1500 if (filedes[1] < 0) {
1501 close(filedes[0]);
1502 CloseHandle(h[1]);
1503 return -1;
1504 }
1505 return 0;
1506}
1507
1508#ifndef __MINGW64__
1509struct tm *gmtime_r(const time_t *timep, struct tm *result)

Callers 3

start_commandFunction · 0.85
start_asyncFunction · 0.85
executeFunction · 0.85

Calls 1

err_win_to_posixFunction · 0.85

Tested by 1

executeFunction · 0.68