[hackers] [sbase] Use /dev/fd/0 as opposed to /dev/stdin || sin

From: <git_AT_suckless.org>
Date: Sat, 05 Jul 2014 00:14:43 +0200

commit 5df631ac0995012f83ecdb5c6ea1dc72fa924d0b
Author: sin <sin_AT_2f30.org>
Date: Fri Jul 4 23:10:14 2014 +0100

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

diff --git a/cat.c b/cat.c
index d22d040..d7ac14f 100644
--- a/cat.c
+++ b/cat.c
_AT_@ -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;
Received on Sat Jul 05 2014 - 00:14:43 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 05 2014 - 00:24:08 CEST