[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-02-26 Thread El Samuko


El Samuko  added the comment:

I'm getting [WinError 87], too, when using the PID.

--

___
Python tracker 
<https://bugs.python.org/issue42962>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-02-26 Thread El Samuko


El Samuko  added the comment:

@eryksun

I can run the script successfully under cygwin and mingw(git bash).
The python version is 3.9.2

--

___
Python tracker 
<https://bugs.python.org/issue42962>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-02-26 Thread El Samuko


El Samuko  added the comment:

FWIW, I could send CTRL-C to ffmpeg (else it won't write a valid mp4 header) 
under Windows by using the WINPID and not the PID returned from ps .

```
WINPID=$(ps aux | grep ffmpeg | awk '{print $4}')
python -c "import os, signal; os.kill($WINPID, signal.CTRL_C_EVENT)"
```

I put an example here:
https://gist.github.com/elsamuko/9c3fe69f00a0f847251ffa3ef1d080a2

--
nosy: +elsamuko

___
Python tracker 
<https://bugs.python.org/issue42962>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com