[ECOS] sdtin/stdout/stderr redirection
Jonathan Larmour
jifl@eCosCentric.com
Tue Apr 8 01:32:00 GMT 2003
Philippe Vandermersch wrote:
> Hi,
>
> I have created a filesystem over PCI which actually allows the Hosted
> PCI board running eCos to access the Filesystem of the Host (running
> Linux).
> Now I would like to know if it is possible to redirect dynamically eCos
> sdtin/stdout/stderr to some other fd than the usual 0,1,2.
> My idea is to open the Linux stdin,sdtout,stderr and to affect the fd
> obtained through my filesystem to the eCos ones.
Strictly the way to do this is using freopen() but that isn't fully
supported by eCos, although it wouldn't be difficult at all - just dropped
off the end several years ago now!
You could even just do it yourself using fclose() and fdopen() and
assigning to stdin - there's nothing else required AFAIK.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list