MCPcopy Index your code
hub / github.com/RsyncProject/rsync / read_arg_from_pipe

Function read_arg_from_pipe

clientserver.c:423–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422#if defined HAVE_SETENV || defined HAVE_PUTENV
423static int read_arg_from_pipe(int fd, char *buf, int limit)
424{
425 char *bp = buf, *eob = buf + limit - 1;
426
427 while (1) {
428 int got = read(fd, bp, 1);
429 if (got != 1) {
430 if (got < 0 && errno == EINTR)
431 continue;
432 return -1;
433 }
434 if (*bp == '\0')
435 break;
436 if (bp < eob)
437 bp++;
438 }
439 *bp = '\0';
440
441 return bp - buf;
442}
443#endif
444
445void set_env_str(const char *var, const char *str)

Callers 1

start_pre_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected