Bugfix: Copy file descriptor before passing it along.
Remove some nonsensical functionality.