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

unable to terminate certain processes with keyboard interrupt (ctrl+c) Edit #46

Closed
yqiang opened this issue Jul 2, 2013 · 11 comments
Closed

Comments

@yqiang
Copy link

yqiang commented Jul 2, 2013

OS X 10.8.3
fish 2.0.0

From time to time fish doesn't return command back to shell after exiting an application.

Repro steps:

Run fish_config
Hit ctrl+c to exit the program
Expected behavior:

User is returned to the shell
Actual behavior

Shell seems to be stuck trying to exit. The last output is "KeyboardInterrupt" from the python script.

This does not happen if I run vanilla fish w/o oh-my-fish.

@bpinto
Copy link
Member

bpinto commented Jul 2, 2013

➜ Website git:(master) ✗ fish_config
Web config started at 'http://localhost:8000/'. Hit enter to stop.
1.0.0.127.in-addr.arpa - - [02/Jul/2013 14:20:48] code 404, message File not found
^C
Shutting down.
➜ Website git:(master) ✗

It could be related to a plugin, what's the plugin list you are using?

@yqiang
Copy link
Author

yqiang commented Jul 2, 2013

I'm not using any plugins. This happens with a stock oh_my_fish install.

Yi

On Tue, Jul 2, 2013 at 10:22 AM, Bruno notifications@github.com wrote:

➜ Website git:(master) ✗ fish_config
Web config started at 'http://localhost:8000/'. Hit enter to stop.
1.0.0.127.in-addr.arpa - - [02/Jul/2013 14:20:48] code 404, message File not found
^C
Shutting down.
➜ Website git:(master) ✗

It could be related to a plugin, what's the plugin list you are using?


Reply to this email directly or view it on GitHubhttps://github.com/bpinto/oh-my-fish/issues/46#issuecomment-20361075
.

@bpinto
Copy link
Member

bpinto commented Jul 2, 2013

Okay, managed to reproduce it. I'll fix it.

@yqiang
Copy link
Author

yqiang commented Jul 2, 2013

Awesome, thanks for the quick turn around!

@bpinto
Copy link
Member

bpinto commented Jul 3, 2013

Okay, I reproduced the error with fish shell version 2 (without oh-my-fish):

bpinto@Brunos-MacBook-Air ~> fish_config
Web config started at 'http://localhost:8001/'. Hit enter to stop.
1.0.0.127.in-addr.arpa - - [03/Jul/2013 17:41:01] code 404, message File not found
^C----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 59854)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in __init__
    self.handle()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 343, in handle
    self.handle_one_request()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 313, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
----------------------------------------
^C----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 59855)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in __init__
    self.handle()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 343, in handle
    self.handle_one_request()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 313, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
----------------------------------------
^C
Shutting down.
bpinto@Brunos-MacBook-Air ~>

If you wait a few seconds before trying to exit (ctrl + c) then it has a nice exit, but if you are fast, this KeyboardInterrupt error is raised.

Could you try without oh-my-fish again?

Ref: fish-shell/fish-shell#886

@bpinto
Copy link
Member

bpinto commented Jul 3, 2013

Apparently it's a common problem with python scripts: http://effbot.org/zone/stupid-exceptions-keyboardinterrupt.htm

@yqiang
Copy link
Author

yqiang commented Jul 3, 2013

I am not able to repro this without oh-my-fish running. With oh-my-fish
running it repros 100%. To be clear, without running oh-my-fish I can also
get the exception to throw, but I get my prompt back. With oh-my-fish
installed, I never get the prompt back.

See the output below:

➜ ~ fish_config
Web config started at 'http://localhost:8000/'. Hit enter to stop.
1.0.0.127.in-addr.arpa - - [03/Jul/2013 15:04:58] code 404, message File
not found
1.0.0.127.in-addr.arpa - - [03/Jul/2013 15:04:58] code 404, message File
not found
^C
Shutting down.

^C^C^C^C

Yi

On Wed, Jul 3, 2013 at 2:16 PM, Bruno notifications@github.com wrote:

Apparently it's a common problem with python scripts:
http://effbot.org/zone/stupid-exceptions-keyboardinterrupt.htm


Reply to this email directly or view it on GitHubhttps://github.com/bpinto/oh-my-fish/issues/46#issuecomment-20445288
.

@bpinto
Copy link
Member

bpinto commented Aug 7, 2013

@yqiang Do you still have this problem? I'll investigate it again!

@bpinto
Copy link
Member

bpinto commented Aug 7, 2013

Could you try installing fish from head and confirm that you are still having this issue?

'Cause I'm using the head version and I get the exception sometimes, but I'm able to get the prompt back.

brew uninstall fish; brew instal fish --HEAD

First time I had the KeyboardInterrupt exception twice, and then no exception:
image

@yqiang
Copy link
Author

yqiang commented Aug 7, 2013

I am not able to repro this anymore using the HEAD version of fish, closing I guess :)

@yqiang yqiang closed this as completed Aug 7, 2013
@bpinto
Copy link
Member

bpinto commented Aug 7, 2013

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants