MCPcopy Create free account
hub / github.com/coreutils/coreutils / wait_for_nonblocking_write

Function wait_for_nonblocking_write

src/iopoll.c:179–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177 Return true, if EAGAIN has been successfully handled. */
178
179static bool
180wait_for_nonblocking_write (int fd)
181{
182 if (! IS_EAGAIN (errno))
183 /* non-recoverable write error */
184 return false;
185
186 /* wait for the file descriptor to become writable */
187 if (iopoll_internal (-1, fd, true, false) != 0)
188 {
189 errno = EAGAIN;
190 return false;
191 }
192
193 /* successfully waited for the descriptor to become writable */
194 return true;
195}
196
197/* wrapper for close() that also waits for FD if non blocking. */
198

Callers 2

close_waitFunction · 0.85
write_waitFunction · 0.85

Calls 1

iopoll_internalFunction · 0.85

Tested by

no test coverage detected