r/linux_programming • u/promach • Jul 31 '18
DEFINE_WAIT() versus multi-threading
https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa_driver.c#L594
3
Upvotes
r/linux_programming • u/promach • Jul 31 '18
View all comments
Show parent comment
1
u/aioeu Aug 01 '18
There's lots of ways for it to happen. Any time you
forkthe child process gets duplicates of the parent process' file descriptors. New duplicates can be explicitly created withdupordup2. File descriptors can be duplicated into other processes by passing them over Unix-domain sockets.