Ensure that redirection is off before attempting to read next line.
This commit is contained in:
+8
-2
@@ -420,8 +420,7 @@ iocsh (const char *pathname)
|
||||
argc = 0;
|
||||
wasOkToBlock = epicsThreadIsOkToBlock(epicsThreadGetIdSelf());
|
||||
epicsThreadSetOkToBlock(epicsThreadGetIdSelf(), 1);
|
||||
while ((raw = epicsReadline(prompt, readlineContext)) != NULL) {
|
||||
lineno++;
|
||||
for (;;) {
|
||||
|
||||
/*
|
||||
* Undo redirection
|
||||
@@ -435,6 +434,13 @@ iocsh (const char *pathname)
|
||||
}
|
||||
stopRedirect(filename, lineno, redirects);
|
||||
|
||||
/*
|
||||
* Read a line
|
||||
*/
|
||||
if ((raw = epicsReadline(prompt, readlineContext)) == NULL)
|
||||
break;
|
||||
lineno++;
|
||||
|
||||
/*
|
||||
* Ignore comment lines other than to echo
|
||||
* them if they came from a script.
|
||||
|
||||
Reference in New Issue
Block a user