From 476d2960e59b676703eb701ae6d2de782f423089 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 15 Mar 2015 12:19:30 +0100 Subject: [PATCH] Don't report a failure exit code on EOF or 'exit' command in batch mode. --- Standalone/ucp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Standalone/ucp.c b/Standalone/ucp.c index 4cd2d0c1..11c8585c 100644 --- a/Standalone/ucp.c +++ b/Standalone/ucp.c @@ -53,7 +53,7 @@ int main(argc, argval) int interactive; int pending_line = 0; struct filesys fsys; - int j, retc; + int j, retc = 0; /*-- char *argv[5];--*/ /* @@ -87,7 +87,7 @@ int main(argc, argval) printf("unix: "); if (fgets(line, 128, stdin) == NULL) { xfs_end(); - exit(1); + exit(retc); } } @@ -126,7 +126,7 @@ int main(argc, argval) switch (match(cmd)) { case 0: /* exit */ xfs_end(); - exit(1); + exit(retc); case 1: /* ls */ if (*arg1) -- 2.34.1