Skip to content

cannot go back to shell normally after quitting using Ctrl-C or Ctrl-D #2

@tddschn

Description

@tddschn

sys setup: macOS 10.14.5, python2.7
shell: zsh 5.7.1

running script can be stopped by sending KeyboardInterrupt with Ctrl-C, but won't go back to the shell before running the script normally.

$ sgp -c sh000001 # sgp is a zsh alias 
***** start *****
名称     股价
深证成指 8922.69
上证指数 2898.6961
上证指数 2898.6961
***** end *****

***** start *****
名称     股价
深证成指 8922.69
上证指数 2898.6961
上证指数 2898.6961
***** end *****

^CTraceback (most recent call last):
  File "/Users/tscapple/bin/stock-get-price", line 102, in <module>
    time.sleep(options.sleep_time)
KeyboardInterrupt

Ctrl-D won't help either. Have to kill this session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions