dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
wsti_so.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comment to processess array.
[wsti_so.git]
/
src
/
process3.c
diff --git
a/src/process3.c
b/src/process3.c
index b2fe61c977e1865ae0941dee874396c81061e9af..4568d97d1e3c4ee1280221fbf7f23ef1cd7f57e2 100644
(file)
--- a/
src/process3.c
+++ b/
src/process3.c
@@
-11,18
+11,20
@@
int main(void) {
/** Named pipe used to communicate with process2 */
char * read_pipe = "/tmp/process2pipe";
/** Named pipe used to communicate with process2 */
char * read_pipe = "/tmp/process2pipe";
+ /** Descriptor of input pipe */
int read_descriptor;
int read_descriptor;
-
+
+ /** Buffer used for storing data from input pipe */
int buffer = 0;
int buffer = 0;
- int i = 0;
+ /** Stores number of bytes read from input pipe in current iteration */
ssize_t count = 0;
/* Reading from process2 */
read_descriptor = open(read_pipe, O_RDONLY);
ssize_t count = 0;
/* Reading from process2 */
read_descriptor = open(read_pipe, O_RDONLY);
-
int number_of_characters = 0
;
-
+
fprintf(stderr, "[%s] Init!\n", "process3")
;
+
while(1) {
/* Read data from input pipe */
count = read(read_descriptor, &buffer, sizeof(int));
while(1) {
/* Read data from input pipe */
count = read(read_descriptor, &buffer, sizeof(int));