[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080105010639.GA8417@slug>
Date: Sat, 5 Jan 2008 02:06:39 +0100
From: Frederik Deweerdt <deweerdt@...e.fr>
To: Phil Endecott <phil_wueww_endecott@...zphil.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: strace, accept(), ERESTARTSYS and EINTR
On Fri, Jan 04, 2008 at 09:01:38PM +0000, Phil Endecott wrote:
> Dear Experts,
>
> I have some code like this:
>
> struct sockaddr_in client_addr;
> socklen_t client_size=sizeof(client_addr);
> int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size);
> if (connfd==-1) {
> // [1]
> .....report error and terminate......
Replacing the (connfd == -1) check with (connfd < 0),
could you try printf'ing connfd and errno here?
Just to confirm strace's output.
> }
> int rc = fcntl(connfd,F_SETFD,FD_CLOEXEC);
>
Regards,
Frederik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists