Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when ctrl-c hit during spinning, handler doesn't catch exception #33

Closed
dmalan opened this issue Feb 13, 2017 · 2 comments
Closed

when ctrl-c hit during spinning, handler doesn't catch exception #33

dmalan opened this issue Feb 13, 2017 · 2 comments
Assignees
Milestone

Comments

@dmalan
Copy link
Member

dmalan commented Feb 13, 2017

# submit50 -v 2017/x/hello
GitHub username: student50
GitHub password: *********
Authentication code: 982775
git clone --bare https://student50@github.com/submit50/student50 /tmp/tmpzp7mh3_1
^C
Submission cancelled.
    File "../submit50.py", line 464, in <module>
    main()
  File "../submit50.py", line 89, in main
    submit(args["args"][0])
  File "../submit50.py", line 213, in submit
    password=password)
  File "../submit50.py", line 395, in run
    raise Error()
Sorry, something's wrong! Let sysadmins@cs50.harvard.edu know!
Submission cancelled.
@dmalan
Copy link
Member Author

dmalan commented Feb 13, 2017

@glennholloway know why this happens? If you hit ctrl-c when using submit50, our handler cleanly aborts the program without any error messages. But if you hit ctrl-c while the spinner is spinning, an exception goes uncaught and you see the Error above, perhaps because the spinner_helper is a separate thread? But when I tried to add an additional

signal.signal(signal.SIGINT, handler)

inside signal_helper, Python complained that it such has to be in the main thread only.

@dmalan dmalan modified the milestone: 2.3.0 Jun 4, 2017
@brianyu28
Copy link
Member

@dmalan, are you sure this wasn't because you were running in verbose mode? I tried hitting ctrl-c while the spinner was running in non-verbose mode and our handler seems to abort the program without any error messages.

@dmalan dmalan closed this as completed Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants