Permalink
Browse files

Don't quit the interactive loop when Ctrl-C is pressed.

NOTE: this doesn't address issue #36, which happens when you start say
'cat' and Ctrl-C.  The Python interpreter still gets the signal then.
  • Loading branch information...
Andy Chu
Andy Chu committed Aug 30, 2018
1 parent 356ad17 commit cae0c273b261d14f3fa9e532b35e4cb6f03be292
Showing with 1 addition and 5 deletions.
  1. +1 −5 bin/oil.py
View
@@ -109,11 +109,7 @@ def InteractiveLoop(opts, ex, c_parser, arena):
w = c_parser.Peek()
except KeyboardInterrupt:
print('Ctrl-C')
break
# TODO: When does this happen?
if w is None:
raise RuntimeError('Failed parse: %s' % c_parser.Error())
continue
c_id = word.CommandId(w)
if c_id == Id.Op_Newline:

0 comments on commit cae0c27

Please sign in to comment.