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

Discussion in 'C Programming' started by lkpaturi, Oct 8, 2010.

  1. lkpaturi

    lkpaturi

    Joined:
    Oct 8, 2010
    Messages:
    1
    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
     
    lkpaturi, Oct 8, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ganesh Gella
    Replies:
    5
    Views:
    1,286
    John Harrison
    Jul 14, 2003
  2. Gonçalo Rodrigues
    Replies:
    0
    Views:
    329
    Gonçalo Rodrigues
    Nov 18, 2004
  3. ken

    prevent dumping core file?

    ken, Jan 20, 2004, in forum: C Programming
    Replies:
    10
    Views:
    833
    Dan Pop
    Jan 22, 2004
  4. Leland Woodbury

    Python 2.2.x core dumping

    Leland Woodbury, Apr 15, 2004, in forum: Python
    Replies:
    1
    Views:
    288
    Jeff Epler
    Apr 15, 2004
  5. yogesh
    Replies:
    3
    Views:
    610
    Kenny McCormack
    Feb 12, 2006
Loading...

Share This Page