← Commit list

48645b835

Ron Yorston
Ron Yorston
2019-04-19
SUCCESS Duration: 150s

Subject

ash: prevent error in backquotes in PS1 from exiting shell

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+3 -1
@@ -13042,6 +13042,7 @@ expandstr(const char *ps, int syntax_type)
{
union node n;
int saveprompt;
+ struct parsefile *file_stop = g_parsefile;
/* XXX Fix (char *) cast. */
setinputstring((char *)ps);
@@ -13068,7 +13069,8 @@ expandstr(const char *ps, int syntax_type)
doprompt = saveprompt;
- popfile();
+ /* Try: PS1='`xxx(`' */
+ unwindfiles(file_stop);
n.narg.type = NARG;
n.narg.next = NULL;