- Search the internet for projects matching the problem definition. Result: There weren't any.
- Search examples/tutorials for terms in the problem definition like fork, poll.
- Write small demos. Modify and combine examples to solve the original problem. Result: Faced many difficulties during adaptation.
- Dive deeper and understand the details of concepts/terms that I am not well versed in, like pipes.
- Apply that deeper knowledge.
- Increase depth until the problem is solved in its entirety.
Notes:
- To display processes starting with "node": ps -ef|grep node
- To run as a background process, add & to the end.
- Windows Subsystem for Linux, using Ubuntu with VS Code, tasks.json to build file (ctrl + shift+b)
- pipes, socketpair, filedescriptor, dup2.
- Redirecting stdin
- fork - exec
- poll
- Converting a string to a vector of strings, with space as delimiter
- Difficulty of using strings. Writing and reading structures is much easier, to read a string after a write, you need to send EOF with close(fd), but then you have the problem of opening the filedescriptor again.
- gcc, makefile, tar
- Difficult to find bug in C: for (int i = 0; len; i++). Note that i< is missing.
- When you print elements of a union structure, you will only get the last set element right.
No comments:
Post a Comment