Re: Why fopen fail because of EINTR?

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 06/20/03


Date: Fri, 20 Jun 2003 14:13:45 GMT

In article <x7wufhkyj8.fsf@bolo.xenadyne.com>,
Sean Burke <burke_sp31415@pacbell.net> wrote:
>So, if you open 255 sockets, thus consuming all of the file
>descriptor thru and beyond 255, a subsequent fopen will fail.
>Presumably with EMFILE.

We agreed that this would fail. The issue under discussion is only whether
it sets errno. The Solaris documentation specifically says that it
doesn't:

     fopen() may fail and not set errno if there are no free
     stdio streams.

but the empirical evidence contradicts this.

-- 
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


Relevant Pages

  • Re: KB192570 done right: Asynchronous sockets in threads
    ... that it will lose data, not report any errors, fail in a Unicode build, fails in a 64-bit ... build, and pretty much gets sockets, threading, and synchronization completely wrong. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: How to tell when execv has succeeded
    ... Start new program running ... Dup the descriptor passed in. ... Dup the random file over the descriptor passed in. ... The standard does not specifically have to say that functions may fail ...
    (comp.unix.programmer)
  • socket open/fopen 256 limit even after closing files.
    ... 16k files or 16k sockets as long as I do not mix fopen and socket open ... Linux and it does not fail at 256. ... total sockets 1021 total file opens 1020 ... resource = RLIMIT_NOFILE; ...
    (comp.unix.solaris)
  • Re: Invalid SID structure?
    ... This seems to only fail if I add an group to ... > descriptor other than NULL. ... > Garfield A. Lewis ...
    (microsoft.public.platformsdk.security)
  • Re: socket open/fopen 256 limit even after closing files.
    ... >socket or fopen will fail. ... This is a Sun bug as I can run the same program on ... >the sockets in my program. ... Expressed in this posting are my opinions. ...
    (comp.unix.solaris)

Loading