From: Roland McGrath Date: Thu, 21 Apr 1994 02:08:28 +0000 (+0000) Subject: (main, decode_switches): Die with 2 for errors. X-Git-Tag: 3.70.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=716e804b5b14251db1db37576d57d3ad41846f24;p=thirdparty%2Fmake.git (main, decode_switches): Die with 2 for errors. (main): Accept 2 return from update_goal_chain and die with that. --- diff --git a/main.c b/main.c index 4b360159..3ad30ef7 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); } }