CST334 Week 2
This week, I got deeper into C programming and learned a lot about handling processes and using Makefiles to keep things efficient. I worked with fork() to create child processes that run alongside the parent process, each doing its own thing but starting from the same code. It was cool to see how exec() lets the child process switch over to something entirely different (like running ls), and using wait() in the parent kept everything orderly by ensuring the parent only moved on after the child finished.
I also set up a Makefile, which made compiling the programs way easier. With just a few commands in the Makefile, everything compiles automatically, and I can clean up with a single command too. Makefiles are a big help for keeping things neat and organized, especially with multiple files. Overall, this week was a solid intro to process management in C, plus some useful tricks to streamline the whole coding workflow!
Comments
Post a Comment