summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/mkfifo.c2
-rw-r--r--mkfifo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index ef3d667..46b1343 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -60,7 +60,7 @@ extern int mkfifo_main(int argc, char **argv)
argc--;
argv++;
}
- if (argc < 1)
+ if (argc < 1 || *argv[0] == '-')
usage(mkfifo_usage);
if (mkfifo(*argv, mode) < 0) {
perror("mkfifo");
diff --git a/mkfifo.c b/mkfifo.c
index ef3d667..46b1343 100644
--- a/mkfifo.c
+++ b/mkfifo.c
@@ -60,7 +60,7 @@ extern int mkfifo_main(int argc, char **argv)
argc--;
argv++;
}
- if (argc < 1)
+ if (argc < 1 || *argv[0] == '-')
usage(mkfifo_usage);
if (mkfifo(*argv, mode) < 0) {
perror("mkfifo");