From 9408814b5c5f0c9368d466160da32b1b4049f03f Mon Sep 17 00:00:00 2001 From: kraai Date: Wed, 27 Sep 2000 03:01:40 +0000 Subject: Continue concatenating files even if we can't open one. git-svn-id: svn://busybox.net/trunk/busybox@1137 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- cat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cat.c') diff --git a/cat.c b/cat.c index 51f1d27a6..151ce4e61 100644 --- a/cat.c +++ b/cat.c @@ -26,20 +26,21 @@ extern int cat_main(int argc, char **argv) { + int status = EXIT_SUCCESS; + if (argc == 1) { print_file(stdin); - exit(TRUE); + return status; } while (--argc > 0) { if(!(strcmp(*++argv, "-"))) { print_file(stdin); } else if (print_file_by_name(*argv) == FALSE) { - perror(*argv); - exit(FALSE); + status = EXIT_FAILURE; } } - return(TRUE); + return status; } /* -- cgit v1.2.3-55-g6feb