MK27 is right. We aren't picky about what indentation/formatting style you choose, but it ought to be consistent. I usually recommend one of the first 3 styles mentioned here: Indent style -...
Type: Posts; User: anduril462
MK27 is right. We aren't picky about what indentation/formatting style you choose, but it ought to be consistent. I usually recommend one of the first 3 styles mentioned here: Indent style -...
Your use of read() is fine. It's the variable readfd that is confusing. The fd implies it's a file descriptor. If it's actually a file descriptor, then readfd = read() will overwrite the file...
Yes, the full code would be helpful, though there are some issues with what you posted. You need to re-read the man page for the read function. It will not return EAGAIN, and you need to check...
Nearly a year in, and 160 posts, and you still aren't providing us with your code...