4 Commits

Author SHA1 Message Date
Sybren A. Stüvel
4b1cf740e9 Cleanup: worker, rename blenderPID to subprocPID
Remove 'blender' from a variable name, since this is actually generic
code and not Blender-specific.
2022-11-22 17:33:16 +01:00
Sybren A. Stüvel
ced826581a Worker: make sure long lines are broken on character boundaries
When a command (like `blender` or `ffmpeg`) outputs lines that are longer
than our buffer, they are broken into buffer-sized chunks. Extra code has
been added to ensure those chunks consist of valid UTF-8 characters.
2022-11-22 17:31:47 +01:00
Sybren A. Stüvel
8c86d4c1a9 Worker: Wait for subprocess even when it failed
The Worker now always waits for subprocesses. When faced with multiple
errors (like I/O reading from stdout and a returned error status from
the process) will return the most important one (in this case the exit
status of the process).

Subprocesses need to be waited for, even when they crashed, otherwise
they will linger around as "defunct" processes. This caused
out-of-memory errors, because several defunct Blenders were eating up
the memory.
2022-07-28 14:36:01 +02:00
Sybren A. Stüvel
c79fe55068 Worker: Refactor the running of subprocesses
Blender and FFmpeg were run in the same way, using copy-pasted code. This
is now abstracted away into the CLI runner, which in turn is moved into
its own subpackage.

No functional changes.
2022-07-28 14:34:33 +02:00