LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-06-2012, 07:38 AM   #1
msubrahmanya
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
getsockopt returns 111 as error code when invoked after epoll_wait call


Hi

I am using an application that tries to connect to a remote server in non-blocking mode. It invokes "connect" and waits for the socket to become writeable using epoll_wait. epoll_wait returns a positive integer. Now as soon as epoll_wait returns, the application checks for any socket error using getsockopt API.
"getsockopt (session, SOL_SOCKET, SO_ERROR, (char*)&sock_err, &sock_err_len)".

Sometimes getsockopt fetches 111 for sock_err. I am not able to understand why the fetched error code will be 111 when there are FDs ready. Did anyone face this issue and do you know what the resolution for the issue is?

Note: I am using RedHat 6.1. Version of the kernel is "2.6.32-131.0.15.el6.x86_64"

Thanks
Subrahmanya
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
K3B - cdrecord returns unknown error (code 22) AlanSecker Linux - Software 2 07-11-2014 09:34 PM
[SOLVED] cURL POST data command from shell returns HTTP Error Code 408 fyndr Linux - Software 3 03-04-2011 10:17 AM
ioctl call returns error. HarryBoy Programming 6 09-10-2008 11:08 AM
Sendmail returned error code 111 newlinuxgeek Linux - Software 1 02-14-2008 03:16 AM
HTTPS returns error code -12263 mesh2005 Linux - Server 3 07-10-2007 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration