in reply to Re: open pipe for input and die
in thread open pipe for input and die

Thanks. I didn't realize open will also return the pid, thus i used open2. The rest of the solution is the same though. I have a __DIE__ handler instead of an END block, because the program itself forks later on and I turn the handler off in the child.