0

I run ffmpeg from python script and need to shutdown recording on demand.
In Linux I just send SIGTERM. But in Windows as I understand SIGTERM replaced by SIGKILL so records needs to be remixed to play properly.
After googling I found that I should use CTRL_BREAK_EVENT but this signal terminate my parent script too.

What should I use?

victor1234
  • 871
  • 3
  • 12
  • 28
  • In order to send `CTRL_BREAK_EVENT`, the child process needs to be attached to the same console as the parent and created with the flag `CREATE_NEW_PROCESS_GROUP`. The child cannot be created with any of the following flags: `CREATE_NEW_CONSOLE`, `CREATE_NO_WINDOW`, or `DETACHED_PROCESS`. – Eryk Sun Jul 05 '19 at 05:07
  • Otherwise if we try to send Ctrl+Break to a non-console child, or a child that's attached to a different console, or a child that's not the leader of a console process group, the system has undefined and quite buggy behavior. It shouldn't. These cases should all have well-defined, documented behavior. I opened an issue for this months ago on the console's GitHub site, but the console devs don't seem to be interested. – Eryk Sun Jul 05 '19 at 05:17

0 Answers0