EmbLogic's Blog

pipe and FIFO…??

Is there any mechanism to remove garbage values from the pipe or FIFO.

As we are reading from pipe/FIFO there are some garbage value along with the desired result.
And in FIFO the behaviour is unexpected, as sometime the it read the exact values, sometime some garbage

One Response to pipe and FIFO…??

  1. pushpa says:

    i dont know if we have special command to flush FIFO.bt what i believe is that if we read all the information in FIFO then there will be nothing inside the fifo.si it will be flushed.

    FIFO max size is 4096 defined in PIPE_BUF.if we make a loop in our pgm so that it reads all the characters till PIPE_BUF then it may work as flushing FIFO contents.

    I hope my suggestion might help you.guide me if i m wrong

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>