pipe restoration

Discussion in 'C Programming' started by teacupfull.software@gmail.com, Apr 17, 2009.

  1. Guest

    Got a question when using pipe for inter process communication.

    I setup a pipe for
    (1) A to B communication
    (2) A to C communication

    Each time during communication, A send a msg to B or C.

    Here is a scenario I have problem.
    At time t, A sent B a msg1. But before B read the msg1 from the pipe,
    B is accidently killed. So this msg1 somehow stay in the pipe.

    At time t+1, A sends another msg2 to C. C read the pipe and get
    actually two msgs. I am OK with this. But then later whenever A sends
    a new msg, C always get two msg, one of which is msg1.
    ..
    This is where I have problem. Is there any way I can fix the pipe.
    So that later when A send msg, C actually will get only one msg
    without getting that msg1.

    thanks.
    , Apr 17, 2009
    #1
    1. Advertising

  2. writes:
    > Got a question when using pipe for inter process communication.

    [...]

    The experts on that subject hang out in comp.unix.programmer.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Apr 17, 2009
    #2
    1. Advertising

  3. Guest

    Thanks. Posted one there.

    On Apr 16, 5:19 pm, Keith Thompson <> wrote:
    > writes:
    > > Got a question when using pipe for inter process communication.

    >
    > [...]
    >
    > The experts on that subject hang out in comp.unix.programmer.
    >
    > --
    > Keith Thompson (The_Other_Keith)  <http://www.ghoti.net/~kst>
    > Nokia
    > "We must do something.  This is something.  Therefore, we must do this."
    >     -- Antony Jay and Jonathan Lynn, "Yes Minister"
    , Apr 17, 2009
    #3
    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. lee, wonsun
    Replies:
    1
    Views:
    470
    Jack Klein
    Nov 2, 2004
  2. Replies:
    5
    Views:
    303
    Claudio Grondi
    Jan 3, 2006
  3. Pavani.Budumuru

    Audio Restoration

    Pavani.Budumuru, Oct 1, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    Pavani.Budumuru
    Oct 1, 2007
  4. Now You Know
    Replies:
    0
    Views:
    285
    Now You Know
    Oct 16, 2008
  5. Replies:
    1
    Views:
    208
    Ben Morrow
    Jun 2, 2004
Loading...

Share This Page