mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix the ^D -> core dump problem properly. ^D == "quit" again.
This commit is contained in:
parent
f4683775d7
commit
faeff70b73
1 changed files with 4 additions and 3 deletions
|
|
@ -243,8 +243,6 @@ int run (int cmd, char *arg)
|
|||
{
|
||||
int l, r, rc;
|
||||
|
||||
if (arg == NULL)
|
||||
return 0;
|
||||
switch (cmd) {
|
||||
|
||||
case CMD_QUIT:
|
||||
|
|
@ -956,8 +954,11 @@ input (int *cmd)
|
|||
el_set(el, EL_SIGNAL, 1);
|
||||
el_source(el, NULL);
|
||||
}
|
||||
if ((bp = el_gets(el, &num)) == NULL || num == 0)
|
||||
if ((bp = el_gets(el, &num)) == NULL || num == 0) {
|
||||
*cmd = CMD_QUIT;
|
||||
fprintf (stderr, "\r\n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
len = (num > MAXLINE) ? MAXLINE : num;
|
||||
memcpy(buf, bp, len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue