lkml.org 
[lkml]   [2006]   [Jun]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    /
    FromMåns Rullgård <>
    SubjectRe: Quick close of all the open files.
    DateWed, 07 Jun 2006 08:57:24 +0100
    "vamsi krishna" <vamsi.krishnak@gmail.com> writes:
    
    >> > >
    >> > I checked as follows I did printf("lowest fd = %d",fileno(tmpfile()));
    >> > it prints 3
    >>
    >> Which proves that file descriptor 3 was closed, so tmpfile() was able to
    >> open it.  This certainly implies that fd 0, 1, 2 (connected to stdin,
    >> stdout, and stderr streams of stdio) are still open, contrary to your
    >> statement that *all* of them are closed.
    >
    > I know 0,1,2 are open (I opened it) no need to tell it specifically,
    > HOW DO YOU THINK I CAN PRINT SOME THING WITHOUT OPENING THIS
    > FILES(stdout,stderr)?
    
    That still says nothing about file descriptors 4 and up.
    
    -- 
    Måns Rullgård
    mru@inprovide.com
    
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    
    
    \
     
     \ /
      Last update: 2006-06-07 10:02    [from the cache]
    ©2003-2008