in reply to Re^2: Can't close STDIN/STDOUT/STDERRin thread Can't close STDIN/STDOUT/STDERR
Though, until you get your program working right, it would be probably better to redirect STDOUT/STDERR to some file you can read (i.e. /tmp/out).