1 /* Utility: Read line from FIFO
5 * Revision 1.3 1995/05/03 12:18:55 adam
6 * This code ran on dtbsun. Minor changes.
8 * Revision 1.2 1995/05/02 15:26:52 adam
9 * EINTR obvserved on reads and writes.
11 * Revision 1.1 1995/05/01 12:43:58 adam
12 * lgets function moved from kernel to util.
27 int lgets (char *buf, int max, int fd)
36 if ((r=read (fd, buf+no, 1)) == 1)
38 if (r == -1 && errno == EINTR)
41 gw_log (GW_LOG_WARN|GW_LOG_ERRNO, "lgets", "read fail");
43 gw_log (GW_LOG_WARN, "lgets", "read eof");
49 if (buf[no++] == '\n')