Use /dev/fd/0 as opposed to /dev/stdin

This commit is contained in:
sin 2014-07-04 23:10:14 +01:00
parent f02f2190f0
commit 5df631ac09
1 changed files with 1 additions and 1 deletions

2
cat.c
View File

@ -30,7 +30,7 @@ main(int argc, char *argv[])
for(i = 0; i < argc; i++) {
p = argv[i];
if (argv[i][0] == '-')
p = "/dev/stdin";
p = "/dev/fd/0";
if(!(fp = fopen(p, "r"))) {
weprintf("fopen %s:", argv[i]);
continue;