← Commit list

970470e23

Denys Vlasenko
Denys Vlasenko
2020-02-16
SUCCESS Duration: 151s

Subject

ash: main: Only set savestatus in exitcmd

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+2 -7
@@ -13427,13 +13427,8 @@ exitcmd(int argc UNUSED_PARAM, char **argv)
if (stoppedjobs())
return 0;
- if (argv[1]) {
- int status = number(argv[1]);
-
- exitstatus = status;
- if (savestatus >= 0)
- savestatus = status;
- }
+ if (argv[1])
+ savestatus = number(argv[1]);
raise_exception(EXEXIT);
/* NOTREACHED */