repositories
/
TD_IML.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Some indentation cleanups on the Mastermind game
[TD_IML.git]
/
TD2
/
exercise3
/
exercise.c
diff --git
a/TD2/exercise3/exercise.c
b/TD2/exercise3/exercise.c
index 1d20fc50192850bce84bb111c0509dcf84da7ba3..9459ab1e87fefdbbcd5c06427b689ea0cda4e7da 100644
(file)
--- a/
TD2/exercise3/exercise.c
+++ b/
TD2/exercise3/exercise.c
@@
-29,6
+29,7
@@
int main() {
} else {
close(pipefd[1]);
printf("[%d] REDIRECTION: \n", getpid());
+ //determine the pipe size to avoid this kind of code
while (read(pipefd[0], &tmpbuf, 1) > 0) {
write(STDOUT_FILENO, &tmpbuf, 1);
}