rdstate() is dumping core on Linux 2.6.x kernel

Joined
Oct 8, 2010
Messages
1
Reaction score
0
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 :-x :-x 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top