LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 03: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, 07:51 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

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

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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



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 On
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

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

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

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
Open Source Consulting | Domain Registration