Sponsored Content
Homework and Emergencies Homework & Coursework Questions program to send messages to parent using pipes and select system call Post 302575616 by ripssingh on Tuesday 22nd of November 2011 07:58:52 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
create child(1m)														  create child(1m)

NAME
create child - Creates a child pointer at the master replica of the parent directory SYNOPSIS
cdscp create child child-name clearinghouse clearinghouse-name ARGUMENTS
The full name of the child pointer. The full name of a clearinghouse that contains a replica of the child directory. DESCRIPTION
The create child command creates a child pointer at the master replica of the parent directory. When CDS looks up a name in the namespace, it uses child pointers to locate directory replicas. Use the set cdscp preferred clearinghouse command before issuing this command to ensure that the request is directed to the master replica. Privilege Required You must have insert permission to the parent directory. NOTES
Use the create child command only to re-create a child pointer that is accidentally deleted. This command is designed only for trou- bleshooting. This command will fail if the associated directory does not exist. If the associated directory exists, this command will return success- fully. This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command creates the child pointer in the parent directory /.:/subsys. It uses the replica located at the /.:/subsys/NY_CH clearinghouse to fill in its replica set. cdscp> create child /.:/subsys clearinghouse /.:/subsys/NY_CH RELATED INFORMATION
Commands: delete child(1m), list child(1m), show child(1m) create child(1m)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy