fix STDIN/STDOUT redirection after restart
Merge pull request #1 from fedro4/master

fix STDIN/STDOUT redirection after restart