implementations of dup3 and fallocate that are good enough to fool LTP