MCPcopy Create free account
hub / github.com/DISTRHO/DPF / writeRetry

Function writeRetry

examples/ExternalUI/ExternalExampleUI.cpp:55–66  ·  view source on GitHub ↗

Helper function to keep trying to write until it succeeds or really errors out

Source from the content-addressed store, hash-verified

53
54// Helper function to keep trying to write until it succeeds or really errors out
55static ssize_t
56writeRetry(int fd, const void* src, size_t size)
57{
58 ssize_t error;
59 int attempts = 0;
60
61 do {
62 error = write(fd, src, size);
63 } while (error == -1 && (errno == EINTR || errno == EPIPE) && ++attempts < 5);
64
65 return error;
66}
67#endif
68
69// -----------------------------------------------------------------------------------------------------------

Callers 3

parameterChangedFunction · 0.85
uiIdleFunction · 0.85
visibilityChangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected