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

cygwin + Ctrl-C doesn't cancel the script #1978

Open
Garfield22 opened this issue Dec 15, 2013 · 1 comment
Open

cygwin + Ctrl-C doesn't cancel the script #1978

Garfield22 opened this issue Dec 15, 2013 · 1 comment

Comments

@Garfield22
Copy link

@Garfield22 Garfield22 commented Dec 15, 2013

Hi,

I am aware of #481 , but it doesn't help me.

I am trying to kill youtube-dl by pressing CTRL-C. It works in windows cmd console, but it does not work in cygwin mintty console.

I have python installed not from cygwin, but as usual windows version.
My OS: windows 7 (x64)
Cygwin: 2.831 (32 bit)
Python version: Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
youtube-dl version: 2013.12.11.2
youtube-dl was installed with pip help: pip install --upgrade youtube_dl

Sample:
youtube-dl http://www.youtube.com/watch?v=sao5-VCcRkQ
or
youtube-dl "http://www.youtube.com/watch?v=sao5-VCcRkQ"
or
youtube-dl 'http://www.youtube.com/watch?v=sao5-VCcRkQ'

It creates 3 processes ( ps -W | grep -i python ):
12004 3992 12004 8940 pty0 1000 20:01:53 /cygdrive/d/Python27/Scripts/youtube-dl
12004 3992 12004 8940 pty0 1000 20:01:53 /cygdrive/d/Python27/Scripts/youtube-dl
12084 0 0 12084 ? 0 20:01:54 D:\Python27\python.exe

When I press CTRL-C youtube-dl ( PID = 12004 ) process is terminated, but python (PID = 12084 ) is still running and continue making text output.

I have to kill python manually with command "taskkill.exe /F /IM python.exe" from second mintty console.

help me please :-)

@Garfield22
Copy link
Author

@Garfield22 Garfield22 commented Dec 16, 2013

Update.

I found a way how to make it work.
I have installed latest python from cygwin's distribution (version 2.7.3).
I have uninstalled youtube-dl with "pip uninstall youtube-dl" command.
Then I have downloaded youtube-dl with curl as described in http://rg3.github.io/youtube-dl/download.html.
Now youtube-dl is working and reacting on CTRL-C.

Curl-downloaded youtube-dl is using cygwin's /bin/python.
PIP-installed youtube-dl version was using windows installed python (D:\Python27\python.exe), probably that was a problem cause.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.