ash,hush: fix SIGCHLD interrupting read builtin
function old new delta readcmd 169 217 +48 shell_builtin_read 1087 1097 +10 localcmd 366 364 -2 builtin_read 197 193 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 58/-6) Total: 52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -204,15 +204,17 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
|
||||
c = buffer[bufpos];
|
||||
if (c == '\0')
|
||||
continue;
|
||||
if (backslash) {
|
||||
backslash = 0;
|
||||
if (c != '\n')
|
||||
goto put;
|
||||
continue;
|
||||
}
|
||||
if (!(read_flags & BUILTIN_READ_RAW) && c == '\\') {
|
||||
backslash = 1;
|
||||
continue;
|
||||
if (!(read_flags & BUILTIN_READ_RAW)) {
|
||||
if (backslash) {
|
||||
backslash = 0;
|
||||
if (c != '\n')
|
||||
goto put;
|
||||
continue;
|
||||
}
|
||||
if (c == '\\') {
|
||||
backslash = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (c == '\n')
|
||||
break;
|
||||
|
Reference in New Issue
Block a user