LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices

Closed Thread
 
Search this Thread
Old 10-08-2010, 04:43 AM   #1
Lkpaturi@tcs
LQ Newbie
 
Registered: Jun 2006
Posts: 3

Rep: Reputation: 0
Unhappy rdstate() is dumping core on Linux 2.6.x kernel


Hi,

I build my executable on a 2.4.x kernel and was running as expected on the same system. Where as when I tried to run it on 2.6.x kernel it was dumping core and the stack trace shows rdstate()

My code check the stream status before calling socket read() function. I'm using

ios *x;

if((x->rdstate() & ios::badbit) != 0)
{
return 0;
}
else
{
....
...
sock->read(...)
..
..
}


When I observed there is diff in rdstate() output on 2.4.x & 2.6.x linux servers


On 2.6.x kernel
ios --> rdstate():0 badbit:4 failbit:2 eofbit:1 ==> for good conditon

ios --> rdstate():192 badbit:4 failbit:2 eofbit:1 ==> for bad condition


On 2.4.x kernel
ios --> rdstate():172 badbit:4 failbit:2 eofbit:1 ==> for good condition

ios --> rdstate():14 badbit:4 failbit:2 eofbit:1 ==> for bad condition





I'd like to know whey rdstate() is returning diff values for diff kernels. Any help would be greatly appreciated
 
Old 10-08-2010, 08:51 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,992

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
Don't post the same question multiple times. Duplicate post reported.
 
Old 10-08-2010, 12:39 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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
Is your gaim core dumping? crisostomo_enrico Solaris / OpenSolaris 5 09-26-2007 08:55 AM
Squid Core Dumping jiminald Linux - Server 2 08-22-2007 05:08 AM
Novell is dumping KDE, so I'll be dumping SuSE KimVette Suse/Novell 10 11-12-2005 09:09 PM
Core dumping... JanusPaul Programming 2 01-24-2005 11:26 PM


All times are GMT -5. The time now is 06:18 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration