Re: kernel error in system call accept() under kernel 2.6.8

From: Peter Duellings
Date: Tue Sep 20 2005 - 10:26:50 EST


Hi Ben,

if Log.Log would modify errno the Log.Log debug output should
not be affected since the value of errno - from my understanding -
is copied on the stack *before* Log.Log is called.
Or did I forget something?



Thanx,


Peter


Benjamin LaHaise wrote:
On Tue, Sep 20, 2005 at 04:25:08PM +0200, Peter Duellings wrote:

//accept may return with a protocol error, simply try again
while( (n = accept(m_ListenFd, (struct sockaddr *) cliaddr, &len)) < 0)
{
Log.Log("Error accept, fd=%d, addrlen=%d, len=%d, errno=%d, %s",
m_ListenFd,
m_AddrLen, len, errno, strerror_r(errno, l_strebuf, sizeof(l_strebuf)));
if (errno == EPROTO || errno == ECONNABORTED) //connection already


Let's see here: what happens if Log.Log() performs a syscall to, say, write out the log message to a buffer?

-ben

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/