fix to RL_STATE_EOF in readline callback mode; fix to edge case for terminating signal handling and exit traps in -c command

This commit is contained in:
Chet Ramey committed 2022-05-03 10:43:44 -04:00
1 parent d0cd67ee13
commit f9ed510acb
15 files changed
+103 -30

No files matched your search

+3 -2
View File
@@ -426,7 +426,7 @@ parse_and_execute (string, from_file, flags)
break;
}
}
if (parse_command () == 0)
{
if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
@@ -561,6 +561,8 @@ parse_and_execute (string, from_file, flags)
throw_to_top_level ();
}
CHECK_TERMSIG;
if (should_jump_to_top_level)
jump_to_top_level (code);
@@ -594,7 +596,6 @@ parse_string (string, from_file, flags, cmdp, endp)
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&ps_sigmask);
#endif
/*itrace("parse_string: `%s'", string);*/
/* Reset the line number if the caller wants us to. If we don't reset the
line number, we have to subtract one, because we will add one just
before executing the next command (resetting the line number sets it to