lua5.2 support and fd leak fixed if pipe() or fork() fails