Re: accept() source code



On 12 Jun, 15:52, Thiyaga <m.thiy...@xxxxxxxxx> wrote:

It would be great, if any body could point me to accept() (solaris
version) of source code.

I am facing frequent accept() failures, which I've already posted in
this group.

One programming error with accept() is forgetting to initialize the
third argument if it is not NULL.

sockaddr_in peer;
socklen_t peer_len = sizeof peer; // <--- must be initialized
int client = accept(sock, (sockaddr*)&peer, &peer_len);

.



Relevant Pages

  • Re: accept() source code
    ... I am facing frequent acceptfailures, ... One programming error with acceptis forgetting to initialize the ...
    (comp.unix.programmer)
  • Re: Buffer Overflow
    ... failures than non-deterministic failures. ... If you initialize the variables to some pre-determined value, ... the environment is unchanged) then the program will err in exactly ... Please note that I am not arguing against writing correct programs. ...
    (comp.unix.programmer)
  • Re: Borland C++ Bilinear Interpolation Implementation
    ... Thanks very much for the information and advice! ... was simply forgetting to initialize the ImagePixels Pointer, ...
    (sci.image.processing)