Hi Gregory,
I think that the most common way of handling this in the child is as
follows:
close(0);
if (open("/dev/null", O_RDONLY) != 0)
{
// error
}
close(1);
if (open("/dev/null", O_WRONLY) != 1)
{
// error
}
close(2);
if (open("/dev/null", O_WRONLY) != 2)
{
// error
}
However, I'll leave this for Andreas to decide.
-Thomas