Code change for redirecting the standard file descriptors.

Reference: http://www.marmakoide.org/download/sssched

#640