title: Question about STDIN STDOUT STDERR
body: <p>I'm designing a MIPS simulator in c++ and my simplified OS must be able to run stat() occasionally (when a program being executed on my simulator requires an input or an output or something.)  </p>
  
  <p>The problem is, I need to be able to assert STDIN, STDOUT, and STDERR as parameters to stat "stat("stdin",buff)" where buff is the pointer to the insertion point, for the struct data returned, in memory.  In reality I'll be using fstat() which uses file descriptors to point to the file to be stat-ed.  My file descriptor table in my simple OS reserves 0, 1, and 2 for stdin, stdout, and stderr.  I'm a bit confused about what STDIN, etc are.  They're streams, I realize that, they're defined in stdio.h, but how in the world do I get a stat struct with all of the relevant information about the file for each of these streams?</p>