How to cleanly end a process started by at?
Bo Berglund
bo.berglund at gmail.com
Tue Dec 8 15:19:42 UTC 2020
On Tue, 8 Dec 2020 12:18:30 +0000, Colin Watson <cjwatson at ubuntu.com>
wrote:
>> Is there any way to simulate whatever happens when I hit Ctrl-C on the
>> keyboard when my script is running interactively in a terminal
>> session?
>
>Ctrl-C sends the SIGINT signal, so "timeout --signal=INT 1h ..." should
>do what you want.
>
Thanks for your response!
It did the trick, now when the task ends the video is properly closed!
I used:
timeout --signal=2 4m getvideo test.mp4 <URL> 94
where getvideo is my script simplifying the use of youtube-dl.
The video was recorded and closed and the resulting length was 4:05
min so it is probably within what can be expected based on the
streaming protocol (94) (where I think many small parts are sent).
Thanks again!
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list