That, surprisingly for raymond, doesn't actually answer the question, since you cannot request opening stdin/stdout/stderr via this API, the values 0..2 are also invalid return values.<p>(/dev/stdin, /dev/stdout, /dev/stderr exist today, but did not then, and even today I don't think you can open/create them since they are symlinks to /proc/self/fd/0..2 and thus open("/dev/stdin", ...) returns -1)<p>AFAIK if you close(0) you lose your stdin and never see it again.