I am studying for my final in systems programming and I have a few questions that I cannot answer.
Say a parent process forks off a child process that creates a large object. Can the child pass this object back to the parent fairly easily using just signals?
A parent process forks off a child process, and the child continues running the same program. Is the best way for the parent to give a data structure to a child that was created before the fork to write to a separate file and give that to the child? (This one I am thinking it is not a good way, because the child will still share some of the parents data, including said data structure)
Let us say you write a program to measure how quick a person's fingers are by trapping SIGINT and then asking them to press Ctrl-C as rapidly as possible. The SIGINT signal handler increments a global counter every time Ctrl-C is typed. After a predefined time it stops and prints the global counter divided by the time used. What is a fundamental problem with this program?
Any help is appreciated.
Some quick thoughts on your questions;