Chat program between two soft terminals of my Linux machine


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Chat program between two soft terminals of my Linux machine
# 1  
Old 08-20-2012
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
Image

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?Smilie

Image

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:
Image

Last edited by shyam.sunder91; 08-21-2012 at 06:26 AM..
# 2  
Old 08-20-2012
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
# 3  
Old 08-21-2012
why the space is also taken as a delimiter can u explain

Quote:
Originally Posted by alister
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.

why the space is also taken as a delimiter can u explain
# 4  
Old 08-21-2012
Because that's what the %s conversion of scanf does. You should look into using fgets()
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

2. Web Development

Can you embed Skype or any other video chat/chat program into a webpage?

Hi, I am trying to embed Skype or any other video chat/chat program into a webpage. Has anyone had success doing this? or know how? Thanks Phil (2 Replies)
Discussion started by: phil_heath
2 Replies

3. Hardware

How to make terminals with a PC(UNIX/LInux) support?

I want to build a network, in this network there is only one PC and 50 terminals, 50 students can use this system to study UNIX/Linux. In the old days, computer was very expensive, many scientists shared a computer with terminals, that means a terminal has no cpu, memory and hardisk. In... (5 Replies)
Discussion started by: haixiao_liu
5 Replies

4. Solaris

x86 Sun Machine and Solaris Soft Mirror

Hi everyone, Normally it always easier in Sparc machine, i can set or manually use the boot-device in NVram to boot the mirrored disk. However I have a big trouble about x86 mirror for a long time. I have been doing anything i can: search document, google, ask the others. Recently i did as... (5 Replies)
Discussion started by: tien86
5 Replies

5. UNIX for Dummies Questions & Answers

Secure Chat program for UNIX

I am wanting to know if you have ever found an extremely secure chat program for UNIX (Solaris 7), such that I could control which users can chat with which users, ie John (teacher) can talk to Suzy (student) or Sam (student) and they can talk back to their teacher BUT there is absolutely ... (1 Reply)
Discussion started by: ixeye
1 Replies

6. Programming

a simple chat program

any suggestions on how i could create a simple chat program between two terminals using pipes? thanks (1 Reply)
Discussion started by: kelogs1347
1 Replies

7. Programming

Chat client-server program

Good day everyone, I'm doing a chat client-server program:server is to receive messages from clients through a TCP port and multicast them back to all clients through a UDP port. This is my client program. I'd not know why it just sends and receives msg from server once, then it stops. Is... (1 Reply)
Discussion started by: powermind
1 Replies

8. UNIX for Dummies Questions & Answers

Chat Program

i need chat program in c. know sockets to some extent. (4 Replies)
Discussion started by: krishnavel
4 Replies

9. IP Networking

Implementation of chat program

Hello there! Can anybody help me out with the steps required in implementing a chat program using sockets? Bye! (2 Replies)
Discussion started by: hufs375
2 Replies

10. UNIX for Dummies Questions & Answers

Chat program

Hi to all small question for someone extremely new to the subject. Could anyone point me in the direction of the source code for a client server, message passing program? Thanx for all your help (6 Replies)
Discussion started by: Mrchat
6 Replies
Login or Register to Ask a Question