MCPcopy Create free account
hub / github.com/OSGeo/gdal / FillPipeFromFile

Function FillPipeFromFile

port/cpl_spawn.cpp:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62/************************************************************************/
63
64static void FillPipeFromFile(VSILFILE *fin, CPL_FILE_HANDLE pipe_fd)
65{
66 char buf[PIPE_BUFFER_SIZE] = {};
67 while (true)
68 {
69 const int nRead =
70 static_cast<int>(VSIFReadL(buf, 1, PIPE_BUFFER_SIZE, fin));
71 if (nRead <= 0)
72 break;
73 if (!CPLPipeWrite(pipe_fd, buf, nRead))
74 break;
75 }
76}
77
78/************************************************************************/
79/* CPLSpawn() */

Callers 1

CPLSpawnFunction · 0.85

Calls 2

VSIFReadLFunction · 0.85
CPLPipeWriteFunction · 0.85

Tested by

no test coverage detected