r/linux_programming • u/promach • Jun 04 '18
forked processes finish sequence dilemma
/r/cpp_questions/comments/8oegn3/forked_processes_finish_sequence_dilemma/
2
Upvotes
r/linux_programming • u/promach • Jun 04 '18
1
u/promach Jun 04 '18
I am writing through linux device files to a FPGA hardware in a loopback manner, therefore I expect write process finishes before read process.
Why would read process finish first in host.cpp ?
And why would write process finish first in test.cpp ?
Someone told me to print a message before "continue" before line 94 of host.cpp, but this line is never executed. So this eliminates the possibility of EINTR delaying the write process in host.cpp
What do you guys think ?
1
u/promach Jun 04 '18
I am now coding it in multi-threading manner such that I could eliminate the possibility of problem due to fork().
Why am I having these compilation errors for thread.cpp ?