Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password 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.


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

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


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;

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, 07:51 AM   #2
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,721

Rep: Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593Reputation: 3593
Don't post the same question multiple times. Duplicate post reported.
Old 10-08-2010, 11:39 AM   #3
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
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 07:55 AM
Squid Core Dumping jiminald Linux - Server 2 08-22-2007 04:08 AM
Novell is dumping KDE, so I'll be dumping SuSE KimVette SUSE / openSUSE 10 11-12-2005 08:09 PM
Core dumping... JanusPaul Programming 2 01-24-2005 10:26 PM

All times are GMT -5. The time now is 04:37 PM.

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