Not sure if that's your intention, but if the child process takes too long, you kill the parent (non-fatally, since it's done inside an eval). You make no attempt to kill the child.
So, after a time-out, the parent goes on its merry way while neither closing the pipe, nor doing a wait. Bad things (for some value of bad) will happen: if the child has finished before the parent, the child will become a zombie (because you didn't wait for it) - and if the parent finished before the child, the child might die due to a SIGPIPE if it writes to the pipe after the parent has finished.
Comment on Re: Timeout with SIG{ALRM} not working as expected