From bbaef66b3f99213f06adf04df6b3e5e61278d75b Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 27 Sep 2000 02:43:35 +0000 Subject: Consolidate handling of some fopen failures. --- sh.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sh.c') diff --git a/sh.c b/sh.c index 77efc6aac..b10614259 100644 --- a/sh.c +++ b/sh.c @@ -1447,10 +1447,7 @@ int shell_main(int argc_l, char **argv_l) fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); } else if (local_pending_command==NULL) { //fprintf(stdout, "optind=%d argv[optind]='%s'\n", optind, argv[optind]); - input = fopen(argv[optind], "r"); - if (!input) { - fatalError("%s: %s\n", argv[optind], strerror(errno)); - } + input = xfopen(argv[optind], "r"); } /* initialize the cwd -- this is never freed...*/ -- cgit v1.2.3