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

Function handle_nonblock

wrapper.c:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static int handle_nonblock(int fd, short poll_events, int err)
206{
207 struct pollfd pfd;
208
209 if (err != EAGAIN && err != EWOULDBLOCK)
210 return 0;
211
212 pfd.fd = fd;
213 pfd.events = poll_events;
214
215 /*
216 * no need to check for errors, here;
217 * a subsequent read/write will detect unrecoverable errors
218 */
219 poll(&pfd, 1, -1);
220 return 1;
221}
222
223/*
224 * xread() is the same a read(), but it automatically restarts read()

Callers 2

xreadFunction · 0.85
xwriteFunction · 0.85

Calls 1

pollFunction · 0.85

Tested by

no test coverage detected