MCPcopy Create free account
hub / github.com/THUNLP-MT/MEAN / close_fd

Function close_fd

evaluation/TMscore.cpp:1354–1359  ·  view source on GitHub ↗

* @brief Helper function to close a file descriptor. * * Inspects @a fd and calls close (3) if it has a non-negative value. * * @param fd a file descriptor. * @relates basic_pstreambuf */

Source from the content-addressed store, hash-verified

1352 * @relates basic_pstreambuf
1353 */
1354 inline void
1355 close_fd(pstreams::fd_type& fd)
1356 {
1357 if (fd >= 0 && ::close(fd) == 0)
1358 fd = -1;
1359 }
1360
1361 /**
1362 * @brief Helper function to close an array of file descriptors.

Callers 4

close_fd_arrayFunction · 0.85
closeMethod · 0.85
waitMethod · 0.85
peofMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected