Uh, good catch. I wasn't thinking straight. Can we be sure fd3 is not data.rd though? I think your version might trash data.rd. I think we should use dup(tar_fd) to get a free fd. Cheers. Tobias