1 /* Utility: Read line from FIFO
5 * Revision 1.2 1995/05/02 15:26:52 adam
6 * EINTR obvserved on reads and writes.
8 * Revision 1.1 1995/05/01 12:43:58 adam
9 * lgets function moved from kernel to util.
23 int lgets (char *buf, int max, int fd)
32 if ((r=read (fd, buf+no, 1)) == 1)
34 if (r == -1 && errno == EINTR)
37 gw_log (GW_LOG_WARN|GW_LOG_ERRNO, "lgets", "read fail");
39 gw_log (GW_LOG_WARN, "lgets", "read eof");
45 if (buf[no++] == '\n')