gdb is leaking a pipe and a socketpair to the inferior. The first is coming from TUI_USE_PIPE_FOR_READLINE, the second from gdbpy_initialize_events.
I once had a patch, see this thread: http://sourceware.org/ml/gdb-patches/2008-12/msg00107.html Perhaps we could revisit it now with gnulib.
Dup. *** This bug has been marked as a duplicate of bug 7912 ***