program to send messages to parent using pipes and select system call

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions program to send messages to parent using pipes and select system call
# 1  
Old 11-22-2011
program to send messages to parent using pipes and select system call

Write a program using select, which will create some number of child processes that continuously send text messages to the parent process using pipes. Each child has its own pipe that it uses to communicate with the parent. The parent uses select () to decide what pipes should be processed to display text messages. Make all error checks in the program

Last edited by ripssingh; 11-22-2011 at 09:00 AM.. Reason: spelling mistake
# 2  
Old 11-22-2011
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Help with Execl system call in a C program?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: "Your a7.c program should use printf to print a nice message. (You can decide what to say.) Then the process... (9 Replies)
Discussion started by: miniviking10
9 Replies

2. IP Networking

Message passing from child to parent using pipes

Hi, I am trying my hand in networking programming in C, and got stuck in piping. I was following some tutorial and did the forking like : while (1) { newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); if (newsockfd < 0) ... (4 Replies)
Discussion started by: abhi1988sri
4 Replies

3. UNIX for Advanced & Expert Users

Issues with select system call

1. We are using client-server model communication using TCP/IP protocol 2. The TCP socket created with O_NON_BLOCK flag 3. When we make attempt to send large data to other process, the send is partially successful. It means we attempt to send 90K data, OS sent only 40K data successfully. ... (3 Replies)
Discussion started by: MasthanDudekula
3 Replies

4. Programming

Notification email in C program, via system call? or?

Hello everyone! I'm quite new here, but this forum helped me a lot before without registering :-) I'll go directly to my problem, I have been searching a bit about this issue but I was not successful. I need to write a program in C code to notificate me (to my email) when some action is done... (7 Replies)
Discussion started by: RoNNo
7 Replies

5. Programming

IPC - pipes between parent and child process

Hi guys, I'm having some problem here, I'm studying pipes, and i want to create a shell in C and at this point a don't want to use semaphores, instead I want to use tricks. Straight to the doubt: I've a parent and a child process, and both of them has some code to execute, and the child process... (5 Replies)
Discussion started by: pharaoh
5 Replies

6. Programming

select() system call takes longer than the timeout specified

Below is my code. Every once in a while the select call takes as long as 150 seconds (discovered by printing time before and after this statement) while the timeout specified into it is only 1 second. Any clue why? I can't believe that select call which has been around for centuries can have a bug,... (15 Replies)
Discussion started by: old_as_a_fossil
15 Replies

7. Programming

A question about the system call mount in a C program

Dear all, Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will be mounted and umounted for several times. I read the man page of the mount system call. I use the following test code #include <sys/mount.h> int main(int argc, char *argv) { if... (5 Replies)
Discussion started by: dariyoosh
5 Replies

8. UNIX for Advanced & Expert Users

how to use exceptfds argument in select system call

Hi, Can any one tell me how to use the fourth argument of select system call.I saw example "port forwarding" on the net,but it was too complex for me to understand.Can any one explain me about the usage of exceptfds argument of select system call with simple example. Thanks. (2 Replies)
Discussion started by: bvijaya
2 Replies

9. Programming

can we send arguments to system() call

Hi friends my C code is int main() { system("cp <source> <destination>"); } my question is how to set variables for <source> and <destination> how can we pass it to system() call. can you suggest me thankyou kingskar (6 Replies)
Discussion started by: kingskar
6 Replies

10. Programming

Implementing 2 pipes between a parent and child process

Hi all, I'm trying to write a program that has some data it wants to send through a filter program(in this case tr), and then recieve the output from that filter program. The way I'm trying to do it is by setting up two pipes between the programs and piping the data in through one pipe and back... (2 Replies)
Discussion started by: bwgoudey
2 Replies
Login or Register to Ask a Question