summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-04-21 02:08:28 +0000
committerRoland McGrath <roland@redhat.com>1994-04-21 02:08:28 +0000
commit716e804b5b14251db1db37576d57d3ad41846f24 (patch)
treee5547970d1e3611522bfaac4e9fb9de359b64926
parent4848c1987006aaec0a07aded82ccebca5253ec2f (diff)
downloadgunmake-716e804b5b14251db1db37576d57d3ad41846f24.tar.gz
(main, decode_switches): Die with 2 for errors.
(main): Accept 2 return from update_goal_chain and die with that.
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index 4b36015..3ad30ef 100644
--- a/main.c
+++ b/main.c
@@ -977,7 +977,7 @@ main (argc, argv, envp)
if (any_remade)
goto re_exec;
else if (any_failed)
- die (1);
+ die (2);
else
break;
}
@@ -1094,8 +1094,12 @@ main (argc, argv, envp)
/* Updated successfully. */
status = 0;
break;
- case 1:
+ case 2:
/* Updating failed. */
+ status = 2;
+ break;
+ case 1:
+ /* We are under -q and would run some commands. */
status = 1;
break;
default:
@@ -1418,7 +1422,7 @@ positive integral argument",
buf, cs->description);
}
- die (bad);
+ die (bad ? 2 : 0);
}
}