[Bf-blender-cvs] [3a8c57cf9dd] master: Support Ctrl-C to cancel rendering with headless builds

Campbell Barton noreply at git.blender.org
Tue Aug 16 02:51:30 CEST 2022


Commit: 3a8c57cf9dd46087ebb9cb3aa8ef195153405d41
Author: Campbell Barton
Date:   Tue Aug 16 10:40:53 2022 +1000
Branches: master
https://developer.blender.org/rB3a8c57cf9dd46087ebb9cb3aa8ef195153405d41

Support Ctrl-C to cancel rendering with headless builds

The original intention from [0] was to force background-mode when built
WITH_HEADLESS or WITH_PYTHON_MODULE, with the else clause setting the
signal handler for Ctrl-C. Since WITH_PYTHON_MODULE now disables all
signal handlers this check no longer makes sense.

[0]: 9d9c05a10106ea08cf5082633a5dd0a007d860ba

===================================================================

M	source/creator/creator_signals.c

===================================================================

diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
index 76423d7ba43..226277da363 100644
--- a/source/creator/creator_signals.c
+++ b/source/creator/creator_signals.c
@@ -244,11 +244,9 @@ void main_signal_setup_background(void)
   /* for all platforms, even windows has it! */
   BLI_assert(G.background);
 
-#  if !defined(WITH_HEADLESS)
   /* Support pressing `Ctrl-C` to close Blender in background-mode.
    * Useful to be able to cancel a render operation. */
   signal(SIGINT, sig_handle_blender_esc);
-#  endif
 }
 
 void main_signal_setup_fpe(void)



More information about the Bf-blender-cvs mailing list