From: David Given Date: Sun, 15 Mar 2015 11:19:30 +0000 (+0100) Subject: Don't report a failure exit code on EOF or 'exit' command in batch mode. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=476d2960e59b676703eb701ae6d2de782f423089;p=FUZIX.git Don't report a failure exit code on EOF or 'exit' command in batch mode. --- 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)