From d4e3f49571893443e7cbd3f93f349fabf27168d3 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Tue, 5 Feb 2019 23:20:43 -0800 Subject: [PATCH] Correct the read_blocked comment --- src/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index fbf8c183c..89488162c 100644 --- a/src/common.h +++ b/src/common.h @@ -764,8 +764,8 @@ void error_reset(); /// initialization. void fish_setlocale(); -/// Call read while blocking the SIGCHLD signal. Should only be called if you _know_ there is data -/// available for reading, or the program will hang until there is data. +/// Call read, blocking and repeating on EINTR. Exits on EAGAIN. +/// \return the number of bytes read, or 0 on EOF. On EAGAIN, returns -1 if nothing was read. long read_blocked(int fd, void *buf, size_t count); /// Loop a write request while failure is non-critical. Return -1 and set errno in case of critical