Closed calebweinreb closed 7 months ago
I've only tested this on ubuntu
I see the problem here — you want the video writers to exit gracefully and close their video files, etc, so you only want the interrupt to apply to the main loop. Cool.
I'm confused though by what you explained here vs. what the code says.
The code has:
# Set the process group ID to to the process ID so it is affected by the main process's stop signal
os.setpgid(0, 0)
("so it is affected...")
but above it seems like you want them to not be affected. Pls explain?
Yes sorry should be so it "isn't" affected.
Corrects an issue with keyboard interrupt. In the current version of the code in
main
, a keyboard interrupt simultaneously interrupts the main thread and also all subprocesses. This is bad and not how the code is designed to work! This PR puts all processes in their own process group which prevents them from hearing the keyboard interrupt.This PR should be merged after https://github.com/dattalab-6-cam/multicamera_acquisition/pull/44