Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/orelang/Interpreter.d
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class Interpreter {
while (true) {
string input = readln.chomp;

if (input == "exit" || input == "(exit)") {
if (stdin.eof() || input == "exit" || input == "(exit)") { // stdin.eof() for Ctrl-D
writeln("bye!"); // print newline, so do not mess up the screen
break;
}

Expand Down
2 changes: 1 addition & 1 deletion source/orelang/operator/SystemOperator.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SystemOperator : IOperator {
auto pid = spawnProcess(args_strs);//execute(args_strs.join(" "));

return new Value(wait(pid));
} catch {
} catch (Throwable) {
return new Value(-1);
}
}
Expand Down