Hi,
The stdout/stdin/stderr devices are initialized in alt_main by the following code:
alt_sys_init ();
/*
* Redirect stdout etc. to the apropriate devices now that the devices have
* been initialised. This is only done if the user has requested that the
* channels been directed away from /dev/null - which is how the channels
* are configured by default. Making the call to alt_io_redirect conditional
* allows this function to be excluded from optomised executables when it
* is unecessary.
*/
if (strcmp (ALT_STDOUT, "/dev/null") ||
strcmp (ALT_STDIN, "/dev/null") ||
strcmp (ALT_STDERR, "/dev/null"))
{
alt_io_redirect (ALT_STDOUT, ALT_STDIN, ALT_STDERR);
}
/* Call the C++ constructors */
_do_ctors ();
In your program, you detele these codes, so it can't support any stdout/stdin/stderr operation.
best regards,
David