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

How to gracefully stop ? #14

Closed
Seblor opened this issue Apr 19, 2021 · 4 comments
Closed

How to gracefully stop ? #14

Seblor opened this issue Apr 19, 2021 · 4 comments
Labels
question Further information is requested

Comments

@Seblor
Copy link

Seblor commented Apr 19, 2021

I am unable to find any way to gracefully stop the download. Even if I use the raw ChildProcess and kill it, the youtube-dl process is killed but it leaves the ffmpeg process hanging, locking the resulting file. And manually killing the ffmpeg process leaves the file corrupted.

@Kikobeats Kikobeats added the question Further information is requested label Apr 19, 2021
@Kikobeats
Copy link
Member

can you try to pass SIGKILL as killSignal ?

const subprocess = youtubedl.raw('https://example.com', { dumpJson: true }, { killSignal: 'SIGKILL`} )

@Seblor
Copy link
Author

Seblor commented Apr 20, 2021

Sadly this does not work. It still leaves the ffmpeg process hanging.

I am on windows, so maybe it is OS related ?

@Kikobeats
Copy link
Member

ops looks like windows could be very particular

sindresorhus/execa#433

@Seblor
Copy link
Author

Seblor commented Apr 20, 2021

I already tried setting windowsHide to false, and using terminate, but the behavior is still the same.

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

No branches or pull requests

2 participants