From 09fdbd36a6d12efd53edd764f3176d3fc3bad284 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 5 Apr 2006 19:29:30 +0000 Subject: [PATCH] Make explicit that open doesn't return fd 0 or 1. Make independence of fds across processes explicit. Thanks to Ryan Seth Propper for question. --- doc/userprog.texi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/userprog.texi b/doc/userprog.texi index ff98074..59b198a 100644 --- a/doc/userprog.texi +++ b/doc/userprog.texi @@ -661,8 +661,12 @@ when the process exits or is terminated. File descriptors numbered 0 and 1 are reserved for the console: fd 0 is standard input (@code{stdin}), fd 1 is standard output -(@code{stdout}). These special file descriptors are valid as system -call arguments only as explicitly described below. +(@code{stdout}). The @code{open} system call will never return either +of these file descriptors, which are valid as system call arguments only +as explicitly described below. + +Each process has an independent set of file descriptors. File +descriptors are not inherited by child processes. Consider implementing this function in terms of @func{filesys_open}. @end deftypefn -- 2.30.2