int filter(int m, int readfd, int writefd)
I have a function named filter that takes three arguments: the filter value m, a file descriptor readfd from which integers are received, and a file descriptor writefd to which integers are written. Its purpose is to remove (filter) any integers from the data stream that are multiples of m. The function returns 0 if it completes without encountering an error and 1 otherwise.
How do I make a file descriptor for input readfd
?