projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09ce45f
)
tee: "-" is a name for stdout, handle it that way
author
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 15 Jul 2008 05:10:15 +0000
(
05:10
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 15 Jul 2008 05:10:15 +0000
(
05:10
-0000)
coreutils/tee.c
patch
|
blob
|
history
diff --git
a/coreutils/tee.c
b/coreutils/tee.c
index b38801755b2dda95ee7b505db2535756ef0e3b45..8a4128591c4b8af0adabad0afe2b765b78112f58 100644
(file)
--- a/
coreutils/tee.c
+++ b/
coreutils/tee.c
@@
-50,10
+50,13
@@
int tee_main(int argc, char **argv)
files[0] = stdout;
goto GOT_NEW_FILE;
do {
- *fp = fopen_or_warn(*argv, mode);
- if (*fp == NULL) {
- retval = EXIT_FAILURE;
- continue;
+ *fp = stdout;
+ if (NOT_LONE_DASH(*argv)) {
+ *fp = fopen_or_warn(*argv, mode);
+ if (*fp == NULL) {
+ retval = EXIT_FAILURE;
+ continue;
+ }
}
*np = *argv++;
GOT_NEW_FILE: