Hi.

    I'm a newbie on this list.

    I'm having my first experiences in Linux programming and now I've found a
very strange problem:

        When executing the following code (no threads and no forks)  I receive a
Memory Fault error message:

============================================================

void function (...)
{
    struct sockaddr_in address;
    int addrlen = 0;
    ...

    ...socket (start_socket, ...)...
    ...setsockopt...
    ...bind...
    ...listen...

printf ("Before accept\n")

    if ((new_socket = accept (start_socket, (struct sockaddr *) &address,
&addrlen)) < 0)
    {
printf ("Error in accept\n")
        ...
    }

printf ("After accept\n")
    ...
}

Output:

Before accept
Memory fault (core dump)

============================================================

I have to assume that the error is produced inside *accept* routine... Really
weird!

    Any help on this will be really welcome.

    Thanks.

        Moises Navarro.

Reply via email to