This is C...things should be named as such. Fixed an off by one error in fd allocation.