02-10-2011
23,310,
4,623
Join Date: Aug 2005
Last Activity: 7 July 2020, 11:47 AM EDT
Location: Saskatchewan
Posts: 23,310
Thanks Given: 1,331
Thanked 4,623 Times in 4,217 Posts
fork() isn't threading. That's why a child would get a copy at all.
Have you checked the return values for every command you do, including close(), etc? Maybe the FD number is getting corrupted somewhere which causes close to fail.