Process « pipe « C Q&A

Home
C Q&A
1.assembly
2.buffer
3.Card
4.Cast
5.compile
6.console
7.const
8.constructor
9.database
10.Date
11.Debug
12.Design
13.Development
14.DLL
15.encrypt
16.enum
17.eof
18.Event
19.fork
20.Format
21.gcc
22.gdb
23.graph
24.graphics
25.gui
26.Holiday Event
27.image
28.IP
29.iterator
30.macro
31.makefile
32.malloc
33.Menu
34.mysql
35.network
36.openssl
37.operator
38.password
39.pipe
40.preprocessor
41.printf
42.pthread
43.Regular expression
44.scanf
45.semaphore
46.SerialPort
47.server
48.Socket
49.sql
50.SQLserver
51.sscanf
52.std
53.stdin
54.stdout
55.stl
56.strcmp
57.stream
58.switch
59.Template
60.thread
61.timer
62.unix
63.video
64.Virtual
65.visualstudio
66.winapi
67.windows
68.xml
C Q&A » pipe » Process 

1. Forking with Pipes    stackoverflow.com

I have tried to do fork() and piping in main and it works perfectly fine but when I try to implement it in a function for some reason I don't get ...

2. C homework assignment, pipes and processes    stackoverflow.com

I've asked many, many C questions here on stackoverflow over the past few days. I feel like I'm at the final one. My assignment works ALMOST perfectly. Here is the premise: Write ...

3. Ring of two processes using a pipe    stackoverflow.com

I have this example of pipe and dup use. It is supposed to create a ring of two processes connected by a pipe. Here is the code:

#include <unistd.h>

#define READ 0
#define WRITE ...

4. Do I have to make a new pipe for every pair of processes in C?    stackoverflow.com

If I have 4 processes that I want to pipe:

process1  |  process2  |  process3  |  process4
do I have to make 3 individual pipes likes this
int ...

5. Process, pipes    cboard.cprogramming.com

Two processes shall communicate with each other. After two seconds the father should send a message to his son, if he's still alive and vice versa. The user can kill one of the two processes entering SIGUSR1 (kill Father) and SIGUSR2 (kill Son). If one process has been killed the other "commits suicide". I've programmed this so far but it's not ...

6. Process and Pipes    cboard.cprogramming.com

#include #include #include #include #include #include int main() { int pid, fd[2], ret; pipe(fd); pid = fork(); if (pid==0) { dup2(fd[1], STDOUT_FILENO); close(fd[0]); close(fd[1]); ret = execlp ("ps", "ps", "-aux", NULL); } else { dup2(fd[0], STDIN_FILENO); close(fd[0]); close(fd[1]); ret=execlp("sort", "sort", "-n", NULL); } return 0; }

7. Same pipe to multiple processes?    cboard.cprogramming.com

Code: #include #include #include #include #include int main(int argc, char **argv) { int pfd[2]; int pid[2]; int status; char buf[6]; if (pipe(pfd) < 0) { fprintf(stderr, "Error creating pipe.\n"); exit(0); } /* First Child */ if ((pid[0] = fork())== 0) { /* Check for first message */ read(pfd[0], buf, 5); buf[5] = '\0'; printf("Child 1's first ...

8. Sychronize process using pipe?    forums.devshed.com

can pipe sychronize thread or process? because I'm trying to create 5 thread or process that can take an integer value and display it. each time a thread display the value, it has to be decrement it by 1 until the value has reach 0. The problem that I'm having is how can that integer value be transfer to those 5 ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.