Reading a line from a fd is way too tedious
The aim of this project is to create a function that reads from file descriptors and returns line by line everytime is called until the end of the file.
char *get_next_line(int fd);
git clone https://github.com/sde-mull/Get_next_line.git
in your file.c
#include "Get_next_line/get_next_line.h" //for one file descriptor
#include "Get_next_line/get_next_line_bonus.h" //for multiple files descriptors at the same time
then compile with
gcc file.c Get_next_line/get_next_line.c Get_next_line/get_next_line_utils.c //for one file descriptor
gcc file.c Get_next_line/get_next_line_bonus.c Get_next_line/get_next_line_utils_bonus.c //for multiple files descriptors at the same time