#include "execnoio.ih"

void ExecNoIO::childRedirections()
{
    close(STDIN_FILENO);  // close and reopen std file descriptors
    close(STDOUT_FILENO);
    close(STDERR_FILENO);

    open("/dev/null", O_RDONLY);        // reopen stdin
    open("/dev/null", O_WRONLY);        // reopen cout
    open(g_tempStream.fileName().c_str(), 
                      O_WRONLY);        // reopen cerr
}
