Chat program between two soft terminals of my Linux machine

here i havent tried to make a communication between two terminals of different machines
not either any socket program

my simple aim is use ipc for chat between two soft terminals(tty's)

here is my view two terminals with two applications working on same fifo
one fifo b/w two terminals try to stout the message from other and vice a versa

i use Ubutntu 3.2.0 version,where, parent executes first

what actually happened is i could not do it msg taken to fifo but not dispalyed at the other end,what may be the mistake?:wall:

more over i could not debug these type of ipc programs suggest me good tutorial links for debugging unix programs rather than simple C programs

---------- Post updated at 04:35 PM ---------- Previous update was at 04:14 PM ----------

sorry i solved this problem just by flushing the buffers
sorry that i posted a simple question but im sure the app is interactive for beginners

here are the result:

Why should the thread be deleted? You had a problem and you solved it. When someone else experiences the same issue, they may find your post helpful.

Thank you for reporting back with your solution.

Regards,
Alister

why the space is also taken as a delimiter can u explain

Because that's what the %s conversion of scanf does. You should look into using fgets()